1. Packages
  2. CockroachDB Cloud
  3. API Docs
  4. getCockroachCluster
CockroachDB v0.6.0 published on Friday, Nov 1, 2024 by pulumiverse

cockroach.getCockroachCluster

Explore with Pulumi AI

cockroach logo
CockroachDB v0.6.0 published on Friday, Nov 1, 2024 by pulumiverse

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: cockroach:index/getCockroachCluster:getCockroachCluster
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Id string
    id String
    id string
    id str
    id String

    getCockroachCluster Result

    The following output properties are available:

    Supporting Types

    GetCockroachClusterDedicated

    DiskIops 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 string
    Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
    MemoryGib double
    Memory per node in GiB.
    NumVirtualCpus int
    Number of virtual CPUs per node in the cluster.
    PrivateNetworkVisibility bool
    Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
    StorageGib int
    Storage amount per node in GiB.
    DiskIops 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 string
    Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
    MemoryGib float64
    Memory per node in GiB.
    NumVirtualCpus int
    Number of virtual CPUs per node in the cluster.
    PrivateNetworkVisibility bool
    Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
    StorageGib int
    Storage amount per node in GiB.
    diskIops 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 String
    Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
    memoryGib Double
    Memory per node in GiB.
    numVirtualCpus Integer
    Number of virtual CPUs per node in the cluster.
    privateNetworkVisibility Boolean
    Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
    storageGib Integer
    Storage amount per node in GiB.
    diskIops 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 string
    Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
    memoryGib number
    Memory per node in GiB.
    numVirtualCpus number
    Number of virtual CPUs per node in the cluster.
    privateNetworkVisibility boolean
    Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
    storageGib number
    Storage amount per node in GiB.
    disk_iops 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 str
    Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
    memory_gib float
    Memory per node in GiB.
    num_virtual_cpus int
    Number of virtual CPUs per node in the cluster.
    private_network_visibility bool
    Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
    storage_gib int
    Storage amount per node in GiB.
    diskIops 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 String
    Machine type identifier within the given cloud provider, ex. m6.xlarge, n2-standard-4.
    memoryGib Number
    Memory per node in GiB.
    numVirtualCpus Number
    Number of virtual CPUs per node in the cluster.
    privateNetworkVisibility Boolean
    Indicates whether private IP addresses are assigned to nodes. Required for CMEK and other advanced networking features.
    storageGib Number
    Storage amount per node in GiB.

    GetCockroachClusterRegion

    InternalDns 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 string
    Region code used by the cluster's cloud provider.
    NodeCount int
    Number of nodes in the region. Will always be 0 for serverless clusters.
    Primary bool
    Denotes whether this is the primary region in a serverless cluster. Dedicated clusters don't have a primary region.
    SqlDns string
    DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
    UiDns string
    DNS name used when connecting to the DB Console for the cluster.
    InternalDns 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 string
    Region code used by the cluster's cloud provider.
    NodeCount int
    Number of nodes in the region. Will always be 0 for serverless clusters.
    Primary bool
    Denotes whether this is the primary region in a serverless cluster. Dedicated clusters don't have a primary region.
    SqlDns string
    DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
    UiDns string
    DNS name used when connecting to the DB Console for the cluster.
    internalDns 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 String
    Region code used by the cluster's cloud provider.
    nodeCount Integer
    Number of nodes in the region. Will always be 0 for serverless clusters.
    primary Boolean
    Denotes whether this is the primary region in a serverless cluster. Dedicated clusters don't have a primary region.
    sqlDns String
    DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
    uiDns String
    DNS name used when connecting to the DB Console for the cluster.
    internalDns 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 string
    Region code used by the cluster's cloud provider.
    nodeCount number
    Number of nodes in the region. Will always be 0 for serverless clusters.
    primary boolean
    Denotes whether this is the primary region in a serverless cluster. Dedicated clusters don't have a primary region.
    sqlDns string
    DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
    uiDns string
    DNS name used when connecting to the DB Console for the cluster.
    internal_dns 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 str
    Region code used by the cluster's cloud provider.
    node_count int
    Number of nodes in the region. Will always be 0 for serverless clusters.
    primary bool
    Denotes whether this is the primary region in a serverless cluster. Dedicated clusters don't have a primary region.
    sql_dns str
    DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
    ui_dns str
    DNS name used when connecting to the DB Console for the cluster.
    internalDns 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 String
    Region code used by the cluster's cloud provider.
    nodeCount Number
    Number of nodes in the region. Will always be 0 for serverless clusters.
    primary Boolean
    Denotes whether this is the primary region in a serverless cluster. Dedicated clusters don't have a primary region.
    sqlDns String
    DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting.
    uiDns String
    DNS name used when connecting to the DB Console for the cluster.

    GetCockroachClusterServerless

    RoutingId string
    Cluster identifier in a connection string.
    SpendLimit 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 string
    Dictates the behavior of cockroach major version upgrades.
    UsageLimits Pulumiverse.Cockroach.Inputs.GetCockroachClusterServerlessUsageLimits
    RoutingId string
    Cluster identifier in a connection string.
    SpendLimit 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 string
    Dictates the behavior of cockroach major version upgrades.
    UsageLimits GetCockroachClusterServerlessUsageLimits
    routingId String
    Cluster identifier in a connection string.
    spendLimit 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 String
    Dictates the behavior of cockroach major version upgrades.
    usageLimits GetCockroachClusterServerlessUsageLimits
    routingId string
    Cluster identifier in a connection string.
    spendLimit 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 string
    Dictates the behavior of cockroach major version upgrades.
    usageLimits GetCockroachClusterServerlessUsageLimits
    routing_id str
    Cluster identifier in a connection string.
    spend_limit 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 str
    Dictates the behavior of cockroach major version upgrades.
    usage_limits GetCockroachClusterServerlessUsageLimits
    routingId String
    Cluster identifier in a connection string.
    spendLimit 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 String
    Dictates the behavior of cockroach major version upgrades.
    usageLimits Property Map

    GetCockroachClusterServerlessUsageLimits

    ProvisionedVirtualCpus int
    Maximum number of vCPUs that the cluster can use.
    RequestUnitLimit int
    Maximum number of Request Units that the cluster can consume during the month.
    StorageMibLimit int
    Maximum amount of storage (in MiB) that the cluster can have at any time during the month.
    ProvisionedVirtualCpus int
    Maximum number of vCPUs that the cluster can use.
    RequestUnitLimit int
    Maximum number of Request Units that the cluster can consume during the month.
    StorageMibLimit int
    Maximum amount of storage (in MiB) that the cluster can have at any time during the month.
    provisionedVirtualCpus Integer
    Maximum number of vCPUs that the cluster can use.
    requestUnitLimit Integer
    Maximum number of Request Units that the cluster can consume during the month.
    storageMibLimit Integer
    Maximum amount of storage (in MiB) that the cluster can have at any time during the month.
    provisionedVirtualCpus number
    Maximum number of vCPUs that the cluster can use.
    requestUnitLimit number
    Maximum number of Request Units that the cluster can consume during the month.
    storageMibLimit number
    Maximum amount of storage (in MiB) that the cluster can have at any time during the month.
    provisioned_virtual_cpus int
    Maximum number of vCPUs that the cluster can use.
    request_unit_limit int
    Maximum number of Request Units that the cluster can consume during the month.
    storage_mib_limit int
    Maximum amount of storage (in MiB) that the cluster can have at any time during the month.
    provisionedVirtualCpus Number
    Maximum number of vCPUs that the cluster can use.
    requestUnitLimit Number
    Maximum number of Request Units that the cluster can consume during the month.
    storageMibLimit 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.
    cockroach logo
    CockroachDB v0.6.0 published on Friday, Nov 1, 2024 by pulumiverse