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

cockroach.CaCert

Explore with Pulumi AI

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

    Manages client CA certs.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cockroach from "@pulumiverse/cockroach";
    
    const config = new pulumi.Config();
    // The X509 certificate in PEM format.
    const clientCertificate = config.require("clientCertificate");
    const prod = new cockroach.CaCert("prod", {
        clusterId: prodCockroachCluster.id,
        x509PemCert: clientCertificate,
    });
    
    import pulumi
    import pulumiverse_cockroach as cockroach
    
    config = pulumi.Config()
    # The X509 certificate in PEM format.
    client_certificate = config.require("clientCertificate")
    prod = cockroach.CaCert("prod",
        cluster_id=prod_cockroach_cluster["id"],
        x509_pem_cert=client_certificate)
    
    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, "")
    		// The X509 certificate in PEM format.
    		clientCertificate := cfg.Require("clientCertificate")
    		_, err := cockroach.NewCaCert(ctx, "prod", &cockroach.CaCertArgs{
    			ClusterId:   pulumi.Any(prodCockroachCluster.Id),
    			X509PemCert: pulumi.String(clientCertificate),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cockroach = Pulumiverse.Cockroach;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        // The X509 certificate in PEM format.
        var clientCertificate = config.Require("clientCertificate");
        var prod = new Cockroach.CaCert("prod", new()
        {
            ClusterId = prodCockroachCluster.Id,
            X509PemCert = clientCertificate,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cockroach.CaCert;
    import com.pulumi.cockroach.CaCertArgs;
    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 clientCertificate = config.get("clientCertificate");
            var prod = new CaCert("prod", CaCertArgs.builder()
                .clusterId(prodCockroachCluster.id())
                .x509PemCert(clientCertificate)
                .build());
    
        }
    }
    
    configuration:
      clientCertificate:
        type: string
    resources:
      prod:
        type: cockroach:CaCert
        properties:
          clusterId: ${prodCockroachCluster.id}
          x509PemCert: ${clientCertificate}
    

    Create CaCert Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CaCert(name: string, args: CaCertArgs, opts?: CustomResourceOptions);
    @overload
    def CaCert(resource_name: str,
               args: CaCertArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def CaCert(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               cluster_id: Optional[str] = None,
               x509_pem_cert: Optional[str] = None)
    func NewCaCert(ctx *Context, name string, args CaCertArgs, opts ...ResourceOption) (*CaCert, error)
    public CaCert(string name, CaCertArgs args, CustomResourceOptions? opts = null)
    public CaCert(String name, CaCertArgs args)
    public CaCert(String name, CaCertArgs args, CustomResourceOptions options)
    
    type: cockroach:CaCert
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CaCertArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CaCertArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CaCertArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CaCertArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CaCertArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var caCertResource = new Cockroach.CaCert("caCertResource", new()
    {
        ClusterId = "string",
        X509PemCert = "string",
    });
    
    example, err := cockroach.NewCaCert(ctx, "caCertResource", &cockroach.CaCertArgs{
    	ClusterId:   pulumi.String("string"),
    	X509PemCert: pulumi.String("string"),
    })
    
    var caCertResource = new CaCert("caCertResource", CaCertArgs.builder()
        .clusterId("string")
        .x509PemCert("string")
        .build());
    
    ca_cert_resource = cockroach.CaCert("caCertResource",
        cluster_id="string",
        x509_pem_cert="string")
    
    const caCertResource = new cockroach.CaCert("caCertResource", {
        clusterId: "string",
        x509PemCert: "string",
    });
    
    type: cockroach:CaCert
    properties:
        clusterId: string
        x509PemCert: string
    

    CaCert Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The CaCert resource accepts the following input properties:

    ClusterId string
    Cluster ID.
    X509PemCert string
    X509 certificate in PEM format.
    ClusterId string
    Cluster ID.
    X509PemCert string
    X509 certificate in PEM format.
    clusterId String
    Cluster ID.
    x509PemCert String
    X509 certificate in PEM format.
    clusterId string
    Cluster ID.
    x509PemCert string
    X509 certificate in PEM format.
    cluster_id str
    Cluster ID.
    x509_pem_cert str
    X509 certificate in PEM format.
    clusterId String
    Cluster ID.
    x509PemCert String
    X509 certificate in PEM format.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CaCert resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Status of client CA certs on a cluster.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Status of client CA certs on a cluster.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Status of client CA certs on a cluster.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Status of client CA certs on a cluster.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Status of client CA certs on a cluster.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Status of client CA certs on a cluster.

    Look up Existing CaCert Resource

    Get an existing CaCert resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CaCertState, opts?: CustomResourceOptions): CaCert
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            status: Optional[str] = None,
            x509_pem_cert: Optional[str] = None) -> CaCert
    func GetCaCert(ctx *Context, name string, id IDInput, state *CaCertState, opts ...ResourceOption) (*CaCert, error)
    public static CaCert Get(string name, Input<string> id, CaCertState? state, CustomResourceOptions? opts = null)
    public static CaCert get(String name, Output<String> id, CaCertState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ClusterId string
    Cluster ID.
    Status string
    Status of client CA certs on a cluster.
    X509PemCert string
    X509 certificate in PEM format.
    ClusterId string
    Cluster ID.
    Status string
    Status of client CA certs on a cluster.
    X509PemCert string
    X509 certificate in PEM format.
    clusterId String
    Cluster ID.
    status String
    Status of client CA certs on a cluster.
    x509PemCert String
    X509 certificate in PEM format.
    clusterId string
    Cluster ID.
    status string
    Status of client CA certs on a cluster.
    x509PemCert string
    X509 certificate in PEM format.
    cluster_id str
    Cluster ID.
    status str
    Status of client CA certs on a cluster.
    x509_pem_cert str
    X509 certificate in PEM format.
    clusterId String
    Cluster ID.
    status String
    Status of client CA certs on a cluster.
    x509PemCert String
    X509 certificate in PEM format.

    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