1. Packages
  2. Rancher2 Provider
  3. API Docs
  4. Certificate
Rancher 2 v8.0.0 published on Wednesday, Dec 4, 2024 by Pulumi

rancher2.Certificate

Explore with Pulumi AI

rancher2 logo
Rancher 2 v8.0.0 published on Wednesday, Dec 4, 2024 by Pulumi

    Provides a Rancher v2 certificate resource. This can be used to create certificates for Rancher v2 environments and retrieve their information.

    There are 2 types of Rancher v2 certificates:

    • Project certificate: Available to all namespaces in the project_id
    • Namespaced certificate: Available to just namespace_id in the project_id

    Create Certificate Resource

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

    Constructor syntax

    new Certificate(name: string, args: CertificateArgs, opts?: CustomResourceOptions);
    @overload
    def Certificate(resource_name: str,
                    args: CertificateArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Certificate(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    certs: Optional[str] = None,
                    key: Optional[str] = None,
                    project_id: Optional[str] = None,
                    annotations: Optional[Mapping[str, str]] = None,
                    description: Optional[str] = None,
                    labels: Optional[Mapping[str, str]] = None,
                    name: Optional[str] = None,
                    namespace_id: Optional[str] = None)
    func NewCertificate(ctx *Context, name string, args CertificateArgs, opts ...ResourceOption) (*Certificate, error)
    public Certificate(string name, CertificateArgs args, CustomResourceOptions? opts = null)
    public Certificate(String name, CertificateArgs args)
    public Certificate(String name, CertificateArgs args, CustomResourceOptions options)
    
    type: rancher2:Certificate
    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 CertificateArgs
    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 CertificateArgs
    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 CertificateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CertificateArgs
    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 certificateResource = new Rancher2.Certificate("certificateResource", new()
    {
        Certs = "string",
        Key = "string",
        ProjectId = "string",
        Annotations = 
        {
            { "string", "string" },
        },
        Description = "string",
        Labels = 
        {
            { "string", "string" },
        },
        Name = "string",
        NamespaceId = "string",
    });
    
    example, err := rancher2.NewCertificate(ctx, "certificateResource", &rancher2.CertificateArgs{
    	Certs:     pulumi.String("string"),
    	Key:       pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	Annotations: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:        pulumi.String("string"),
    	NamespaceId: pulumi.String("string"),
    })
    
    var certificateResource = new Certificate("certificateResource", CertificateArgs.builder()
        .certs("string")
        .key("string")
        .projectId("string")
        .annotations(Map.of("string", "string"))
        .description("string")
        .labels(Map.of("string", "string"))
        .name("string")
        .namespaceId("string")
        .build());
    
    certificate_resource = rancher2.Certificate("certificateResource",
        certs="string",
        key="string",
        project_id="string",
        annotations={
            "string": "string",
        },
        description="string",
        labels={
            "string": "string",
        },
        name="string",
        namespace_id="string")
    
    const certificateResource = new rancher2.Certificate("certificateResource", {
        certs: "string",
        key: "string",
        projectId: "string",
        annotations: {
            string: "string",
        },
        description: "string",
        labels: {
            string: "string",
        },
        name: "string",
        namespaceId: "string",
    });
    
    type: rancher2:Certificate
    properties:
        annotations:
            string: string
        certs: string
        description: string
        key: string
        labels:
            string: string
        name: string
        namespaceId: string
        projectId: string
    

    Certificate 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 Certificate resource accepts the following input properties:

    Certs string
    Base64 encoded public certs (string)
    Key string
    Base64 encoded private key (string)
    ProjectId string
    The project id where the certificate should be created (string)
    Annotations Dictionary<string, string>
    Annotations for certificate object (map)
    Description string
    A certificate description (string)
    Labels Dictionary<string, string>
    Labels for certificate object (map)
    Name string
    The name of the certificate (string)
    NamespaceId string
    The namespace id where the namespaced certificate should be created (string)
    Certs string
    Base64 encoded public certs (string)
    Key string
    Base64 encoded private key (string)
    ProjectId string
    The project id where the certificate should be created (string)
    Annotations map[string]string
    Annotations for certificate object (map)
    Description string
    A certificate description (string)
    Labels map[string]string
    Labels for certificate object (map)
    Name string
    The name of the certificate (string)
    NamespaceId string
    The namespace id where the namespaced certificate should be created (string)
    certs String
    Base64 encoded public certs (string)
    key String
    Base64 encoded private key (string)
    projectId String
    The project id where the certificate should be created (string)
    annotations Map<String,String>
    Annotations for certificate object (map)
    description String
    A certificate description (string)
    labels Map<String,String>
    Labels for certificate object (map)
    name String
    The name of the certificate (string)
    namespaceId String
    The namespace id where the namespaced certificate should be created (string)
    certs string
    Base64 encoded public certs (string)
    key string
    Base64 encoded private key (string)
    projectId string
    The project id where the certificate should be created (string)
    annotations {[key: string]: string}
    Annotations for certificate object (map)
    description string
    A certificate description (string)
    labels {[key: string]: string}
    Labels for certificate object (map)
    name string
    The name of the certificate (string)
    namespaceId string
    The namespace id where the namespaced certificate should be created (string)
    certs str
    Base64 encoded public certs (string)
    key str
    Base64 encoded private key (string)
    project_id str
    The project id where the certificate should be created (string)
    annotations Mapping[str, str]
    Annotations for certificate object (map)
    description str
    A certificate description (string)
    labels Mapping[str, str]
    Labels for certificate object (map)
    name str
    The name of the certificate (string)
    namespace_id str
    The namespace id where the namespaced certificate should be created (string)
    certs String
    Base64 encoded public certs (string)
    key String
    Base64 encoded private key (string)
    projectId String
    The project id where the certificate should be created (string)
    annotations Map<String>
    Annotations for certificate object (map)
    description String
    A certificate description (string)
    labels Map<String>
    Labels for certificate object (map)
    name String
    The name of the certificate (string)
    namespaceId String
    The namespace id where the namespaced certificate should be created (string)

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Certificate Resource

    Get an existing Certificate 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?: CertificateState, opts?: CustomResourceOptions): Certificate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            annotations: Optional[Mapping[str, str]] = None,
            certs: Optional[str] = None,
            description: Optional[str] = None,
            key: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            namespace_id: Optional[str] = None,
            project_id: Optional[str] = None) -> Certificate
    func GetCertificate(ctx *Context, name string, id IDInput, state *CertificateState, opts ...ResourceOption) (*Certificate, error)
    public static Certificate Get(string name, Input<string> id, CertificateState? state, CustomResourceOptions? opts = null)
    public static Certificate get(String name, Output<String> id, CertificateState 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:
    Annotations Dictionary<string, string>
    Annotations for certificate object (map)
    Certs string
    Base64 encoded public certs (string)
    Description string
    A certificate description (string)
    Key string
    Base64 encoded private key (string)
    Labels Dictionary<string, string>
    Labels for certificate object (map)
    Name string
    The name of the certificate (string)
    NamespaceId string
    The namespace id where the namespaced certificate should be created (string)
    ProjectId string
    The project id where the certificate should be created (string)
    Annotations map[string]string
    Annotations for certificate object (map)
    Certs string
    Base64 encoded public certs (string)
    Description string
    A certificate description (string)
    Key string
    Base64 encoded private key (string)
    Labels map[string]string
    Labels for certificate object (map)
    Name string
    The name of the certificate (string)
    NamespaceId string
    The namespace id where the namespaced certificate should be created (string)
    ProjectId string
    The project id where the certificate should be created (string)
    annotations Map<String,String>
    Annotations for certificate object (map)
    certs String
    Base64 encoded public certs (string)
    description String
    A certificate description (string)
    key String
    Base64 encoded private key (string)
    labels Map<String,String>
    Labels for certificate object (map)
    name String
    The name of the certificate (string)
    namespaceId String
    The namespace id where the namespaced certificate should be created (string)
    projectId String
    The project id where the certificate should be created (string)
    annotations {[key: string]: string}
    Annotations for certificate object (map)
    certs string
    Base64 encoded public certs (string)
    description string
    A certificate description (string)
    key string
    Base64 encoded private key (string)
    labels {[key: string]: string}
    Labels for certificate object (map)
    name string
    The name of the certificate (string)
    namespaceId string
    The namespace id where the namespaced certificate should be created (string)
    projectId string
    The project id where the certificate should be created (string)
    annotations Mapping[str, str]
    Annotations for certificate object (map)
    certs str
    Base64 encoded public certs (string)
    description str
    A certificate description (string)
    key str
    Base64 encoded private key (string)
    labels Mapping[str, str]
    Labels for certificate object (map)
    name str
    The name of the certificate (string)
    namespace_id str
    The namespace id where the namespaced certificate should be created (string)
    project_id str
    The project id where the certificate should be created (string)
    annotations Map<String>
    Annotations for certificate object (map)
    certs String
    Base64 encoded public certs (string)
    description String
    A certificate description (string)
    key String
    Base64 encoded private key (string)
    labels Map<String>
    Labels for certificate object (map)
    name String
    The name of the certificate (string)
    namespaceId String
    The namespace id where the namespaced certificate should be created (string)
    projectId String
    The project id where the certificate should be created (string)

    Package Details

    Repository
    Rancher2 pulumi/pulumi-rancher2
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the rancher2 Terraform Provider.
    rancher2 logo
    Rancher 2 v8.0.0 published on Wednesday, Dec 4, 2024 by Pulumi