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,
});
import pulumi
import pulumi_cockroach as cockroach
config = pulumi.Config()
cluster_id = config.require("clusterId")
cockroach = cockroach.get_cockroach_cluster(id=cluster_id)
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
})
}
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,
});
});
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());
}
}
configuration:
clusterId:
type: string
variables:
cockroach:
fn::invoke:
function: cockroach:getCockroachCluster
arguments:
id: ${clusterId}
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>
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]
func GetCockroachCluster(ctx *Context, args *GetCockroachClusterArgs, opts ...InvokeOption) (*GetCockroachClusterResult, error)
func GetCockroachClusterOutput(ctx *Context, args *GetCockroachClusterOutputArgs, opts ...InvokeOption) GetCockroachClusterResultOutput
> 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)
}
public static CompletableFuture<GetCockroachClusterResult> getCockroachCluster(GetCockroachClusterArgs args, InvokeOptions options)
public static Output<GetCockroachClusterResult> getCockroachCluster(GetCockroachClusterArgs args, InvokeOptions options)
fn::invoke:
function: cockroach:index/getCockroachCluster:getCockroachCluster
arguments:
# arguments dictionary
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:
- Account
Id string - Backup
Config Pulumiverse.Cockroach. Outputs. Get Cockroach Cluster Backup Config - Cloud
Provider string - Cockroach
Version string - Creator
Id string - Dedicated
Pulumiverse.
Cockroach. Outputs. Get Cockroach Cluster Dedicated - Delete
Protection bool - Id string
- Name string
- Operation
Status string - Parent
Id string - Plan string
- Regions
List<Pulumiverse.
Cockroach. Outputs. Get Cockroach Cluster Region> - Serverless
Pulumiverse.
Cockroach. Outputs. Get Cockroach Cluster Serverless - State string
- Upgrade
Status string
- Account
Id string - Backup
Config GetCockroach Cluster Backup Config - Cloud
Provider string - Cockroach
Version string - Creator
Id string - Dedicated
Get
Cockroach Cluster Dedicated - Delete
Protection bool - Id string
- Name string
- Operation
Status string - Parent
Id string - Plan string
- Regions
[]Get
Cockroach Cluster Region - Serverless
Get
Cockroach Cluster Serverless - State string
- Upgrade
Status string
- account
Id String - backup
Config GetCockroach Cluster Backup Config - cloud
Provider String - cockroach
Version String - creator
Id String - dedicated
Get
Cockroach Cluster Dedicated - delete
Protection Boolean - id String
- name String
- operation
Status String - parent
Id String - plan String
- regions
List<Get
Cockroach Cluster Region> - serverless
Get
Cockroach Cluster Serverless - state String
- upgrade
Status String
- account
Id string - backup
Config GetCockroach Cluster Backup Config - cloud
Provider string - cockroach
Version string - creator
Id string - dedicated
Get
Cockroach Cluster Dedicated - delete
Protection boolean - id string
- name string
- operation
Status string - parent
Id string - plan string
- regions
Get
Cockroach Cluster Region[] - serverless
Get
Cockroach Cluster Serverless - state string
- upgrade
Status string
- account_
id str - backup_
config GetCockroach Cluster Backup Config - cloud_
provider str - cockroach_
version str - creator_
id str - dedicated
Get
Cockroach Cluster Dedicated - delete_
protection bool - id str
- name str
- operation_
status str - parent_
id str - plan str
- regions
Sequence[Get
Cockroach Cluster Region] - serverless
Get
Cockroach Cluster Serverless - state str
- upgrade_
status str
- account
Id String - backup
Config Property Map - cloud
Provider String - cockroach
Version String - creator
Id String - dedicated Property Map
- delete
Protection Boolean - id String
- name String
- operation
Status String - parent
Id String - plan String
- regions List<Property Map>
- serverless Property Map
- state String
- upgrade
Status String
Supporting Types
GetCockroachClusterBackupConfig
- 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. 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.
- frequency
Minutes This property is required. Integer - The frequency of backups in minutes.
- retention
Days This property is required. Integer - The number of days to retain backups for.
- enabled
This property is required. boolean - Indicates whether backups are enabled.
- frequency
Minutes This property is required. number - The frequency of backups in minutes.
- retention
Days 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.
- frequency
Minutes This property is required. Number - The frequency of backups in minutes.
- retention
Days This property is required. Number - The number of days to retain backups for.
GetCockroachClusterDedicated
- Cidr
Range 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.
- 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. string - Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
- Memory
Gib This property is required. double - 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.
- Cidr
Range 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.
- 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. string - Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
- Memory
Gib This property is required. float64 - 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.
- cidr
Range 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.
- disk
Iops 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.
- machine
Type This property is required. String - Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
- memory
Gib This property is required. Double - Memory per node in GiB.
- num
Virtual Cpus This property is required. Integer - Number of virtual CPUs per node in the cluster.
- private
Network Visibility This property is required. Boolean - Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
- storage
Gib This property is required. Integer - Storage amount per node in GiB.
- cidr
Range 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.
- disk
Iops 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.
- machine
Type This property is required. string - Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
- memory
Gib This property is required. number - Memory per node in GiB.
- num
Virtual Cpus This property is required. number - Number of virtual CPUs per node in the cluster.
- private
Network Visibility This property is required. boolean - Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
- storage
Gib 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.
- cidr
Range 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.
- disk
Iops 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.
- machine
Type This property is required. String - Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
- memory
Gib This property is required. Number - Memory per node in GiB.
- num
Virtual Cpus This property is required. Number - Number of virtual CPUs per node in the cluster.
- private
Network Visibility This property is required. Boolean - Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
- storage
Gib This property is required. Number - Storage amount per node in GiB.
GetCockroachClusterRegion
- Internal
Dns 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.
- 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. string - DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
- Ui
Dns This property is required. string - DNS name used when connecting to the DB Console for the cluster.
- Internal
Dns 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.
- 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. string - DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
- Ui
Dns This property is required. string - DNS name used when connecting to the DB Console for the cluster.
- internal
Dns 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.
- node
Count 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.
- sql
Dns This property is required. String - DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
- ui
Dns This property is required. String - DNS name used when connecting to the DB Console for the cluster.
- internal
Dns 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.
- node
Count 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.
- sql
Dns This property is required. string - DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
- ui
Dns 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.
- internal
Dns 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.
- node
Count 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.
- sql
Dns This property is required. String - DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
- ui
Dns This property is required. String - DNS name used when connecting to the DB Console for the cluster.
GetCockroachClusterServerless
- Routing
Id This property is required. string - Cluster identifier in a connection string.
- Spend
Limit This property is required. int - Spend limit in US cents.
- Upgrade
Type This property is required. string - Dictates the behavior of CockroachDB major version upgrades.
- Usage
Limits This property is required. Pulumiverse.Cockroach. Inputs. Get Cockroach Cluster Serverless Usage Limits
- Routing
Id This property is required. string - Cluster identifier in a connection string.
- Spend
Limit This property is required. int - Spend limit in US cents.
- Upgrade
Type This property is required. string - Dictates the behavior of CockroachDB major version upgrades.
- Usage
Limits This property is required. GetCockroach Cluster Serverless Usage Limits
- routing
Id This property is required. String - Cluster identifier in a connection string.
- spend
Limit This property is required. Integer - Spend limit in US cents.
- upgrade
Type This property is required. String - Dictates the behavior of CockroachDB major version upgrades.
- usage
Limits This property is required. GetCockroach Cluster Serverless Usage Limits
- routing
Id This property is required. string - Cluster identifier in a connection string.
- spend
Limit This property is required. number - Spend limit in US cents.
- upgrade
Type This property is required. string - Dictates the behavior of CockroachDB major version upgrades.
- usage
Limits This property is required. GetCockroach Cluster Serverless Usage Limits
- 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.
- upgrade_
type This property is required. str - Dictates the behavior of CockroachDB major version upgrades.
- usage_
limits This property is required. GetCockroach Cluster Serverless Usage Limits
- routing
Id This property is required. String - Cluster identifier in a connection string.
- spend
Limit This property is required. Number - Spend limit in US cents.
- upgrade
Type This property is required. String - Dictates the behavior of CockroachDB major version upgrades.
- usage
Limits This property is required. Property Map
GetCockroachClusterServerlessUsageLimits
- 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.
- 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.
- provisioned
Virtual Cpus This property is required. Integer - Maximum number of vCPUs that the cluster can use.
- request
Unit Limit This property is required. Integer - Maximum number of Request Units that the cluster can consume during the month.
- storage
Mib Limit This property is required. Integer - Maximum amount of storage (in MiB) that the cluster can have at any time during the month.
- provisioned
Virtual Cpus This property is required. number - Maximum number of vCPUs that the cluster can use.
- request
Unit Limit This property is required. number - Maximum number of Request Units that the cluster can consume during the month.
- storage
Mib Limit 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.
- provisioned
Virtual Cpus This property is required. Number - Maximum number of vCPUs that the cluster can use.
- request
Unit Limit This property is required. Number - Maximum number of Request Units that the cluster can consume during the month.
- storage
Mib Limit 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.