Certificate

Creates and manages an AWS IoT certificate.

Example Usage

With CSR

using System.IO;
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var cert = new Aws.Iot.Certificate("cert", new Aws.Iot.CertificateArgs
        {
            Csr = File.ReadAllText("/my/csr.pem"),
            Active = true,
        });
    }

}

Coming soon!

import pulumi
import pulumi_aws as aws

cert = aws.iot.Certificate("cert",
    csr=(lambda path: open(path).read())("/my/csr.pem"),
    active=True)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * from "fs";

const cert = new aws.iot.Certificate("cert", {
    csr: fs.readFileSync("/my/csr.pem"),
    active: true,
});

Without CSR

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var cert = new Aws.Iot.Certificate("cert", new Aws.Iot.CertificateArgs
        {
            Active = true,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/iot"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iot.NewCertificate(ctx, "cert", &iot.CertificateArgs{
			Active: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

cert = aws.iot.Certificate("cert", active=True)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const cert = new aws.iot.Certificate("cert", {
    active: true,
});

Create a Certificate Resource

new Certificate(name: string, args: CertificateArgs, opts?: CustomResourceOptions);
@overload
def Certificate(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                active: Optional[bool] = None,
                csr: Optional[str] = None)
@overload
def Certificate(resource_name: str,
                args: CertificateArgs,
                opts: Optional[ResourceOptions] = 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.
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.

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:

Active bool
Boolean flag to indicate if the certificate should be active
Csr string
The certificate signing request. Review CreateCertificateFromCsr for more information on generating a certificate from a certificate signing request (CSR). If none is specified both the certificate and keys will be generated, review CreateKeysAndCertificate for more information on generating keys and a certificate.
Active bool
Boolean flag to indicate if the certificate should be active
Csr string
The certificate signing request. Review CreateCertificateFromCsr for more information on generating a certificate from a certificate signing request (CSR). If none is specified both the certificate and keys will be generated, review CreateKeysAndCertificate for more information on generating keys and a certificate.
active boolean
Boolean flag to indicate if the certificate should be active
csr string
The certificate signing request. Review CreateCertificateFromCsr for more information on generating a certificate from a certificate signing request (CSR). If none is specified both the certificate and keys will be generated, review CreateKeysAndCertificate for more information on generating keys and a certificate.
active bool
Boolean flag to indicate if the certificate should be active
csr str
The certificate signing request. Review CreateCertificateFromCsr for more information on generating a certificate from a certificate signing request (CSR). If none is specified both the certificate and keys will be generated, review CreateKeysAndCertificate for more information on generating keys and a certificate.

Outputs

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

Arn string
The ARN of the created certificate.
CertificatePem string
The certificate data, in PEM format.
Id string
The provider-assigned unique ID for this managed resource.
PrivateKey string
When no CSR is provided, the private key.
PublicKey string
When no CSR is provided, the public key.
Arn string
The ARN of the created certificate.
CertificatePem string
The certificate data, in PEM format.
Id string
The provider-assigned unique ID for this managed resource.
PrivateKey string
When no CSR is provided, the private key.
PublicKey string
When no CSR is provided, the public key.
arn string
The ARN of the created certificate.
certificatePem string
The certificate data, in PEM format.
id string
The provider-assigned unique ID for this managed resource.
privateKey string
When no CSR is provided, the private key.
publicKey string
When no CSR is provided, the public key.
arn str
The ARN of the created certificate.
certificate_pem str
The certificate data, in PEM format.
id str
The provider-assigned unique ID for this managed resource.
private_key str
When no CSR is provided, the private key.
public_key str
When no CSR is provided, the public key.

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,
        active: Optional[bool] = None,
        arn: Optional[str] = None,
        certificate_pem: Optional[str] = None,
        csr: Optional[str] = None,
        private_key: Optional[str] = None,
        public_key: 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:

Active bool
Boolean flag to indicate if the certificate should be active
Arn string
The ARN of the created certificate.
CertificatePem string
The certificate data, in PEM format.
Csr string
The certificate signing request. Review CreateCertificateFromCsr for more information on generating a certificate from a certificate signing request (CSR). If none is specified both the certificate and keys will be generated, review CreateKeysAndCertificate for more information on generating keys and a certificate.
PrivateKey string
When no CSR is provided, the private key.
PublicKey string
When no CSR is provided, the public key.
Active bool
Boolean flag to indicate if the certificate should be active
Arn string
The ARN of the created certificate.
CertificatePem string
The certificate data, in PEM format.
Csr string
The certificate signing request. Review CreateCertificateFromCsr for more information on generating a certificate from a certificate signing request (CSR). If none is specified both the certificate and keys will be generated, review CreateKeysAndCertificate for more information on generating keys and a certificate.
PrivateKey string
When no CSR is provided, the private key.
PublicKey string
When no CSR is provided, the public key.
active boolean
Boolean flag to indicate if the certificate should be active
arn string
The ARN of the created certificate.
certificatePem string
The certificate data, in PEM format.
csr string
The certificate signing request. Review CreateCertificateFromCsr for more information on generating a certificate from a certificate signing request (CSR). If none is specified both the certificate and keys will be generated, review CreateKeysAndCertificate for more information on generating keys and a certificate.
privateKey string
When no CSR is provided, the private key.
publicKey string
When no CSR is provided, the public key.
active bool
Boolean flag to indicate if the certificate should be active
arn str
The ARN of the created certificate.
certificate_pem str
The certificate data, in PEM format.
csr str
The certificate signing request. Review CreateCertificateFromCsr for more information on generating a certificate from a certificate signing request (CSR). If none is specified both the certificate and keys will be generated, review CreateKeysAndCertificate for more information on generating keys and a certificate.
private_key str
When no CSR is provided, the private key.
public_key str
When no CSR is provided, the public key.

Package Details

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