1. Packages
  2. CockroachDB Cloud
  3. API Docs
  4. getCockroachCluster
CockroachDB v0.9.4 published on Friday, Mar 21, 2025 by pulumiverse

cockroach.getCockroachCluster

Explore with Pulumi AI

CockroachDB Cloud cluster. Can be Dedicated or Serverless.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cockroach from "@pulumi/cockroach";

const config = new pulumi.Config();
const clusterId = config.require("clusterId");
const cockroach = cockroach.getCockroachCluster({
    id: clusterId,
});
Copy
import pulumi
import pulumi_cockroach as cockroach

config = pulumi.Config()
cluster_id = config.require("clusterId")
cockroach = cockroach.get_cockroach_cluster(id=cluster_id)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
	"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		clusterId := cfg.Require("clusterId")
		_, err := cockroach.GetCockroachCluster(ctx, &cockroach.GetCockroachClusterArgs{
			Id: clusterId,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cockroach = Pulumi.Cockroach;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var clusterId = config.Require("clusterId");
    var cockroach = Cockroach.GetCockroachCluster.Invoke(new()
    {
        Id = clusterId,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cockroach.CockroachFunctions;
import com.pulumi.cockroach.inputs.GetCockroachClusterArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var clusterId = config.get("clusterId");
        final var cockroach = CockroachFunctions.getCockroachCluster(GetCockroachClusterArgs.builder()
            .id(clusterId)
            .build());

    }
}
Copy
configuration:
  clusterId:
    type: string
variables:
  cockroach:
    fn::invoke:
      function: cockroach:getCockroachCluster
      arguments:
        id: ${clusterId}
Copy

Using getCockroachCluster

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getCockroachCluster(args: GetCockroachClusterArgs, opts?: InvokeOptions): Promise<GetCockroachClusterResult>
function getCockroachClusterOutput(args: GetCockroachClusterOutputArgs, opts?: InvokeOptions): Output<GetCockroachClusterResult>
Copy
def get_cockroach_cluster(id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetCockroachClusterResult
def get_cockroach_cluster_output(id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetCockroachClusterResult]
Copy
func GetCockroachCluster(ctx *Context, args *GetCockroachClusterArgs, opts ...InvokeOption) (*GetCockroachClusterResult, error)
func GetCockroachClusterOutput(ctx *Context, args *GetCockroachClusterOutputArgs, opts ...InvokeOption) GetCockroachClusterResultOutput
Copy

> Note: This function is named GetCockroachCluster in the Go SDK.

public static class GetCockroachCluster 
{
    public static Task<GetCockroachClusterResult> InvokeAsync(GetCockroachClusterArgs args, InvokeOptions? opts = null)
    public static Output<GetCockroachClusterResult> Invoke(GetCockroachClusterInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetCockroachClusterResult> getCockroachCluster(GetCockroachClusterArgs args, InvokeOptions options)
public static Output<GetCockroachClusterResult> getCockroachCluster(GetCockroachClusterArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: cockroach:index/getCockroachCluster:getCockroachCluster
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id This property is required. string
Id This property is required. string
id This property is required. String
id This property is required. string
id This property is required. str
id This property is required. String

getCockroachCluster Result

The following output properties are available:

Supporting Types

GetCockroachClusterBackupConfig

Enabled This property is required. bool
Indicates whether backups are enabled.
FrequencyMinutes This property is required. int
The frequency of backups in minutes.
RetentionDays This property is required. int
The number of days to retain backups for.
Enabled This property is required. bool
Indicates whether backups are enabled.
FrequencyMinutes This property is required. int
The frequency of backups in minutes.
RetentionDays This property is required. int
The number of days to retain backups for.
enabled This property is required. Boolean
Indicates whether backups are enabled.
frequencyMinutes This property is required. Integer
The frequency of backups in minutes.
retentionDays This property is required. Integer
The number of days to retain backups for.
enabled This property is required. boolean
Indicates whether backups are enabled.
frequencyMinutes This property is required. number
The frequency of backups in minutes.
retentionDays This property is required. number
The number of days to retain backups for.
enabled This property is required. bool
Indicates whether backups are enabled.
frequency_minutes This property is required. int
The frequency of backups in minutes.
retention_days This property is required. int
The number of days to retain backups for.
enabled This property is required. Boolean
Indicates whether backups are enabled.
frequencyMinutes This property is required. Number
The frequency of backups in minutes.
retentionDays This property is required. Number
The number of days to retain backups for.

GetCockroachClusterDedicated

CidrRange This property is required. string
The IPv4 range in CIDR format that is in use by the cluster. It is only set on GCP clusters and is otherwise empty.
DiskIops This property is required. int
Number of disk I/O operations per second that are permitted on each node in the cluster. Zero indicates the cloud provider-specific default.
MachineType This property is required. string
Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
MemoryGib This property is required. double
Memory per node in GiB.
NumVirtualCpus This property is required. int
Number of virtual CPUs per node in the cluster.
PrivateNetworkVisibility This property is required. bool
Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
StorageGib This property is required. int
Storage amount per node in GiB.
CidrRange This property is required. string
The IPv4 range in CIDR format that is in use by the cluster. It is only set on GCP clusters and is otherwise empty.
DiskIops This property is required. int
Number of disk I/O operations per second that are permitted on each node in the cluster. Zero indicates the cloud provider-specific default.
MachineType This property is required. string
Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
MemoryGib This property is required. float64
Memory per node in GiB.
NumVirtualCpus This property is required. int
Number of virtual CPUs per node in the cluster.
PrivateNetworkVisibility This property is required. bool
Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
StorageGib This property is required. int
Storage amount per node in GiB.
cidrRange This property is required. String
The IPv4 range in CIDR format that is in use by the cluster. It is only set on GCP clusters and is otherwise empty.
diskIops This property is required. Integer
Number of disk I/O operations per second that are permitted on each node in the cluster. Zero indicates the cloud provider-specific default.
machineType This property is required. String
Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
memoryGib This property is required. Double
Memory per node in GiB.
numVirtualCpus This property is required. Integer
Number of virtual CPUs per node in the cluster.
privateNetworkVisibility This property is required. Boolean
Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
storageGib This property is required. Integer
Storage amount per node in GiB.
cidrRange This property is required. string
The IPv4 range in CIDR format that is in use by the cluster. It is only set on GCP clusters and is otherwise empty.
diskIops This property is required. number
Number of disk I/O operations per second that are permitted on each node in the cluster. Zero indicates the cloud provider-specific default.
machineType This property is required. string
Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
memoryGib This property is required. number
Memory per node in GiB.
numVirtualCpus This property is required. number
Number of virtual CPUs per node in the cluster.
privateNetworkVisibility This property is required. boolean
Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
storageGib This property is required. number
Storage amount per node in GiB.
cidr_range This property is required. str
The IPv4 range in CIDR format that is in use by the cluster. It is only set on GCP clusters and is otherwise empty.
disk_iops This property is required. int
Number of disk I/O operations per second that are permitted on each node in the cluster. Zero indicates the cloud provider-specific default.
machine_type This property is required. str
Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
memory_gib This property is required. float
Memory per node in GiB.
num_virtual_cpus This property is required. int
Number of virtual CPUs per node in the cluster.
private_network_visibility This property is required. bool
Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
storage_gib This property is required. int
Storage amount per node in GiB.
cidrRange This property is required. String
The IPv4 range in CIDR format that is in use by the cluster. It is only set on GCP clusters and is otherwise empty.
diskIops This property is required. Number
Number of disk I/O operations per second that are permitted on each node in the cluster. Zero indicates the cloud provider-specific default.
machineType This property is required. String
Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
memoryGib This property is required. Number
Memory per node in GiB.
numVirtualCpus This property is required. Number
Number of virtual CPUs per node in the cluster.
privateNetworkVisibility This property is required. Boolean
Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
storageGib This property is required. Number
Storage amount per node in GiB.

GetCockroachClusterRegion

InternalDns This property is required. string
Internal DNS name of the cluster within the cloud provider's network. Used to connect to the cluster with PrivateLink or VPC peering.
Name This property is required. string
Region code used by the cluster's cloud provider.
NodeCount This property is required. int
Number of nodes in the region. Will always be 0 for serverless clusters.
Primary This property is required. bool
Denotes whether this is the primary region in a serverless cluster. Dedicated clusters don't have a primary region.
SqlDns This property is required. string
DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
UiDns This property is required. string
DNS name used when connecting to the DB Console for the cluster.
InternalDns This property is required. string
Internal DNS name of the cluster within the cloud provider's network. Used to connect to the cluster with PrivateLink or VPC peering.
Name This property is required. string
Region code used by the cluster's cloud provider.
NodeCount This property is required. int
Number of nodes in the region. Will always be 0 for serverless clusters.
Primary This property is required. bool
Denotes whether this is the primary region in a serverless cluster. Dedicated clusters don't have a primary region.
SqlDns This property is required. string
DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
UiDns This property is required. string
DNS name used when connecting to the DB Console for the cluster.
internalDns This property is required. String
Internal DNS name of the cluster within the cloud provider's network. Used to connect to the cluster with PrivateLink or VPC peering.
name This property is required. String
Region code used by the cluster's cloud provider.
nodeCount This property is required. Integer
Number of nodes in the region. Will always be 0 for serverless clusters.
primary This property is required. Boolean
Denotes whether this is the primary region in a serverless cluster. Dedicated clusters don't have a primary region.
sqlDns This property is required. String
DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
uiDns This property is required. String
DNS name used when connecting to the DB Console for the cluster.
internalDns This property is required. string
Internal DNS name of the cluster within the cloud provider's network. Used to connect to the cluster with PrivateLink or VPC peering.
name This property is required. string
Region code used by the cluster's cloud provider.
nodeCount This property is required. number
Number of nodes in the region. Will always be 0 for serverless clusters.
primary This property is required. boolean
Denotes whether this is the primary region in a serverless cluster. Dedicated clusters don't have a primary region.
sqlDns This property is required. string
DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
uiDns This property is required. string
DNS name used when connecting to the DB Console for the cluster.
internal_dns This property is required. str
Internal DNS name of the cluster within the cloud provider's network. Used to connect to the cluster with PrivateLink or VPC peering.
name This property is required. str
Region code used by the cluster's cloud provider.
node_count This property is required. int
Number of nodes in the region. Will always be 0 for serverless clusters.
primary This property is required. bool
Denotes whether this is the primary region in a serverless cluster. Dedicated clusters don't have a primary region.
sql_dns This property is required. str
DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
ui_dns This property is required. str
DNS name used when connecting to the DB Console for the cluster.
internalDns This property is required. String
Internal DNS name of the cluster within the cloud provider's network. Used to connect to the cluster with PrivateLink or VPC peering.
name This property is required. String
Region code used by the cluster's cloud provider.
nodeCount This property is required. Number
Number of nodes in the region. Will always be 0 for serverless clusters.
primary This property is required. Boolean
Denotes whether this is the primary region in a serverless cluster. Dedicated clusters don't have a primary region.
sqlDns This property is required. String
DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
uiDns This property is required. String
DNS name used when connecting to the DB Console for the cluster.

GetCockroachClusterServerless

RoutingId This property is required. string
Cluster identifier in a connection string.
SpendLimit This property is required. int
Spend limit in US cents.

Deprecated: The spend_limit attribute is deprecated and will be removed in a future release of the provider. Configure 'usage_limits' instead.

UpgradeType This property is required. string
Dictates the behavior of CockroachDB major version upgrades.
UsageLimits This property is required. Pulumiverse.Cockroach.Inputs.GetCockroachClusterServerlessUsageLimits
RoutingId This property is required. string
Cluster identifier in a connection string.
SpendLimit This property is required. int
Spend limit in US cents.

Deprecated: The spend_limit attribute is deprecated and will be removed in a future release of the provider. Configure 'usage_limits' instead.

UpgradeType This property is required. string
Dictates the behavior of CockroachDB major version upgrades.
UsageLimits This property is required. GetCockroachClusterServerlessUsageLimits
routingId This property is required. String
Cluster identifier in a connection string.
spendLimit This property is required. Integer
Spend limit in US cents.

Deprecated: The spend_limit attribute is deprecated and will be removed in a future release of the provider. Configure 'usage_limits' instead.

upgradeType This property is required. String
Dictates the behavior of CockroachDB major version upgrades.
usageLimits This property is required. GetCockroachClusterServerlessUsageLimits
routingId This property is required. string
Cluster identifier in a connection string.
spendLimit This property is required. number
Spend limit in US cents.

Deprecated: The spend_limit attribute is deprecated and will be removed in a future release of the provider. Configure 'usage_limits' instead.

upgradeType This property is required. string
Dictates the behavior of CockroachDB major version upgrades.
usageLimits This property is required. GetCockroachClusterServerlessUsageLimits
routing_id This property is required. str
Cluster identifier in a connection string.
spend_limit This property is required. int
Spend limit in US cents.

Deprecated: The spend_limit attribute is deprecated and will be removed in a future release of the provider. Configure 'usage_limits' instead.

upgrade_type This property is required. str
Dictates the behavior of CockroachDB major version upgrades.
usage_limits This property is required. GetCockroachClusterServerlessUsageLimits
routingId This property is required. String
Cluster identifier in a connection string.
spendLimit This property is required. Number
Spend limit in US cents.

Deprecated: The spend_limit attribute is deprecated and will be removed in a future release of the provider. Configure 'usage_limits' instead.

upgradeType This property is required. String
Dictates the behavior of CockroachDB major version upgrades.
usageLimits This property is required. Property Map

GetCockroachClusterServerlessUsageLimits

ProvisionedVirtualCpus This property is required. int
Maximum number of vCPUs that the cluster can use.
RequestUnitLimit This property is required. int
Maximum number of Request Units that the cluster can consume during the month.
StorageMibLimit This property is required. int
Maximum amount of storage (in MiB) that the cluster can have at any time during the month.
ProvisionedVirtualCpus This property is required. int
Maximum number of vCPUs that the cluster can use.
RequestUnitLimit This property is required. int
Maximum number of Request Units that the cluster can consume during the month.
StorageMibLimit This property is required. int
Maximum amount of storage (in MiB) that the cluster can have at any time during the month.
provisionedVirtualCpus This property is required. Integer
Maximum number of vCPUs that the cluster can use.
requestUnitLimit This property is required. Integer
Maximum number of Request Units that the cluster can consume during the month.
storageMibLimit This property is required. Integer
Maximum amount of storage (in MiB) that the cluster can have at any time during the month.
provisionedVirtualCpus This property is required. number
Maximum number of vCPUs that the cluster can use.
requestUnitLimit This property is required. number
Maximum number of Request Units that the cluster can consume during the month.
storageMibLimit This property is required. number
Maximum amount of storage (in MiB) that the cluster can have at any time during the month.
provisioned_virtual_cpus This property is required. int
Maximum number of vCPUs that the cluster can use.
request_unit_limit This property is required. int
Maximum number of Request Units that the cluster can consume during the month.
storage_mib_limit This property is required. int
Maximum amount of storage (in MiB) that the cluster can have at any time during the month.
provisionedVirtualCpus This property is required. Number
Maximum number of vCPUs that the cluster can use.
requestUnitLimit This property is required. Number
Maximum number of Request Units that the cluster can consume during the month.
storageMibLimit This property is required. Number
Maximum amount of storage (in MiB) that the cluster can have at any time during the month.

Package Details

Repository
cockroach pulumiverse/pulumi-cockroach
License
Apache-2.0
Notes
This Pulumi package is based on the cockroach Terraform Provider.