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

cockroach.getClusterCert

Explore with Pulumi AI

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

    TLS certificate for the specified CockroachDB cluster. Certificates for dedicated clusters should be written to $HOME/Library/CockroachCloud/certs/<cluster name>-ca.crt on MacOS or Linux, or $env:appdata\CockroachCloud\certs\<cluster name>-ca.crt on Windows.

    Serverless clusters use the root PostgreSQL CA cert. If it isn’t already installed, the certificate can be appended to $HOME/.postgresql/root.crt on MacOS or Linux, or $env:appdata\postgresql\root.crt on Windows.

    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.getClusterCert({
        id: clusterId,
    });
    
    import pulumi
    import pulumi_cockroach as cockroach
    
    config = pulumi.Config()
    cluster_id = config.require("clusterId")
    cockroach = cockroach.get_cluster_cert(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.GetClusterCert(ctx, &cockroach.GetClusterCertArgs{
    			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.GetClusterCert.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.GetClusterCertArgs;
    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.getClusterCert(GetClusterCertArgs.builder()
                .id(clusterId)
                .build());
    
        }
    }
    
    configuration:
      clusterId:
        type: string
    variables:
      cockroach:
        fn::invoke:
          Function: cockroach:getClusterCert
          Arguments:
            id: ${clusterId}
    

    Using getClusterCert

    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 getClusterCert(args: GetClusterCertArgs, opts?: InvokeOptions): Promise<GetClusterCertResult>
    function getClusterCertOutput(args: GetClusterCertOutputArgs, opts?: InvokeOptions): Output<GetClusterCertResult>
    def get_cluster_cert(id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetClusterCertResult
    def get_cluster_cert_output(id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetClusterCertResult]
    func GetClusterCert(ctx *Context, args *GetClusterCertArgs, opts ...InvokeOption) (*GetClusterCertResult, error)
    func GetClusterCertOutput(ctx *Context, args *GetClusterCertOutputArgs, opts ...InvokeOption) GetClusterCertResultOutput

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

    public static class GetClusterCert 
    {
        public static Task<GetClusterCertResult> InvokeAsync(GetClusterCertArgs args, InvokeOptions? opts = null)
        public static Output<GetClusterCertResult> Invoke(GetClusterCertInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClusterCertResult> getClusterCert(GetClusterCertArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: cockroach:index/getClusterCert:getClusterCert
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Cluster ID.
    Id string
    Cluster ID.
    id String
    Cluster ID.
    id string
    Cluster ID.
    id str
    Cluster ID.
    id String
    Cluster ID.

    getClusterCert Result

    The following output properties are available:

    Cert string
    Certificate contents.
    Id string
    Cluster ID.
    Cert string
    Certificate contents.
    Id string
    Cluster ID.
    cert String
    Certificate contents.
    id String
    Cluster ID.
    cert string
    Certificate contents.
    id string
    Cluster ID.
    cert str
    Certificate contents.
    id str
    Cluster ID.
    cert String
    Certificate contents.
    id String
    Cluster ID.

    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