Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

Certificate

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 a Certificate Resource

new Certificate(name: string, args: CertificateArgs, opts?: CustomResourceOptions);
def Certificate(resource_name: str, opts: Optional[ResourceOptions] = None, annotations: Optional[Mapping[str, Any]] = None, certs: Optional[str] = None, description: Optional[str] = None, key: Optional[str] = None, labels: Optional[Mapping[str, Any]] = None, name: Optional[str] = None, namespace_id: Optional[str] = None, project_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)
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.
opts ResourceOptions
A bag of options that control this 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.

Certificate Resource Properties

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

Inputs

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, object>

Annotations for certificate object (map)

Description string

A certificate description (string)

Labels Dictionary<string, object>

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]interface{}

Annotations for certificate object (map)

Description string

A certificate description (string)

Labels map[string]interface{}

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]: any}

Annotations for certificate object (map)

description string

A certificate description (string)

labels {[key: string]: any}

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, Any]

Annotations for certificate object (map)

description str

A certificate description (string)

labels Mapping[str, Any]

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)

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 str
The provider-assigned unique ID for this managed resource.

Look up an 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, Any]] = None, certs: Optional[str] = None, description: Optional[str] = None, key: Optional[str] = None, labels: Optional[Mapping[str, Any]] = 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)
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.

The following state arguments are supported:

Annotations Dictionary<string, object>

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, object>

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]interface{}

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]interface{}

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]: any}

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]: any}

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, Any]

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, Any]

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)

Package Details

Repository
https://github.com/pulumi/pulumi-rancher2
License
Apache-2.0
Notes
This Pulumi package is based on the rancher2 Terraform Provider.