Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

AWS Classic

v4.29.0 published on Monday, Nov 22, 2021 by Pulumi

CertificateValidation

This resource represents a successful validation of an ACM certificate in concert with other resources.

Most commonly, this resource is used together with aws.route53.Record and aws.acm.Certificate to request a DNS validated certificate, deploy the required validation records and wait for validation to complete.

WARNING: This resource implements a part of the validation workflow. It does not represent a real-world entity in AWS, therefore changing or deleting this resource on its own has no immediate effect.

Example Usage

DNS Validation with Route 53

Coming soon!

Coming soon!

import pulumi
import pulumi_aws as aws

example_certificate = aws.acm.Certificate("exampleCertificate",
    domain_name="example.com",
    validation_method="DNS")
example_zone = aws.route53.get_zone(name="example.com",
    private_zone=False)
example_record = []
for range in [{"key": k, "value": v} for [k, v] in enumerate({dvo.domainName: {
    name: dvo.resourceRecordName,
    record: dvo.resourceRecordValue,
    type: dvo.resourceRecordType,
} for dvo in example_certificate.domainValidationOptions})]:
    example_record.append(aws.route53.Record(f"exampleRecord-{range['key']}",
        allow_overwrite=True,
        name=range["value"]["name"],
        records=[range["value"]["record"]],
        ttl=60,
        type=range["value"]["type"],
        zone_id=example_zone.zone_id))
example_certificate_validation = aws.acm.CertificateValidation("exampleCertificateValidation",
    certificate_arn=example_certificate.arn,
    validation_record_fqdns=example_record.apply(lambda example_record: [record.fqdn for record in example_record]))
# ... other configuration ...
example_listener = aws.lb.Listener("exampleListener", certificate_arn=example_certificate_validation.certificate_arn)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleCertificate = new aws.acm.Certificate("exampleCertificate", {
    domainName: "example.com",
    validationMethod: "DNS",
});
const exampleZone = aws.route53.getZone({
    name: "example.com",
    privateZone: false,
});
const exampleRecord: aws.route53.Record[];
for (const range of Object.entries(exampleCertificate.domainValidationOptions.apply(domainValidationOptions => domainValidationOptions.reduce((__obj, dvo) => { ...__obj, [dvo.domainName]: {
    name: dvo.resourceRecordName,
    record: dvo.resourceRecordValue,
    type: dvo.resourceRecordType,
} }))).map(([k, v]) => {key: k, value: v})) {
    exampleRecord.push(new aws.route53.Record(`exampleRecord-${range.key}`, {
        allowOverwrite: true,
        name: range.value.name,
        records: [range.value.record],
        ttl: 60,
        type: range.value.type,
        zoneId: exampleZone.then(exampleZone => exampleZone.zoneId),
    }));
}
const exampleCertificateValidation = new aws.acm.CertificateValidation("exampleCertificateValidation", {
    certificateArn: exampleCertificate.arn,
    validationRecordFqdns: exampleRecord.apply(exampleRecord => exampleRecord.map(record => record.fqdn)),
});
// ... other configuration ...
const exampleListener = new aws.lb.Listener("exampleListener", {certificateArn: exampleCertificateValidation.certificateArn});

Email Validation

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleCertificate = new Aws.Acm.Certificate("exampleCertificate", new Aws.Acm.CertificateArgs
        {
            DomainName = "example.com",
            ValidationMethod = "EMAIL",
        });
        var exampleCertificateValidation = new Aws.Acm.CertificateValidation("exampleCertificateValidation", new Aws.Acm.CertificateValidationArgs
        {
            CertificateArn = exampleCertificate.Arn,
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleCertificate, err := acm.NewCertificate(ctx, "exampleCertificate", &acm.CertificateArgs{
			DomainName:       pulumi.String("example.com"),
			ValidationMethod: pulumi.String("EMAIL"),
		})
		if err != nil {
			return err
		}
		_, err = acm.NewCertificateValidation(ctx, "exampleCertificateValidation", &acm.CertificateValidationArgs{
			CertificateArn: exampleCertificate.Arn,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

example_certificate = aws.acm.Certificate("exampleCertificate",
    domain_name="example.com",
    validation_method="EMAIL")
example_certificate_validation = aws.acm.CertificateValidation("exampleCertificateValidation", certificate_arn=example_certificate.arn)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleCertificate = new aws.acm.Certificate("exampleCertificate", {
    domainName: "example.com",
    validationMethod: "EMAIL",
});
const exampleCertificateValidation = new aws.acm.CertificateValidation("exampleCertificateValidation", {certificateArn: exampleCertificate.arn});

Create a CertificateValidation Resource

new CertificateValidation(name: string, args: CertificateValidationArgs, opts?: CustomResourceOptions);
@overload
def CertificateValidation(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          certificate_arn: Optional[str] = None,
                          validation_record_fqdns: Optional[Sequence[str]] = None)
@overload
def CertificateValidation(resource_name: str,
                          args: CertificateValidationArgs,
                          opts: Optional[ResourceOptions] = None)
func NewCertificateValidation(ctx *Context, name string, args CertificateValidationArgs, opts ...ResourceOption) (*CertificateValidation, error)
public CertificateValidation(string name, CertificateValidationArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args CertificateValidationArgs
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 CertificateValidationArgs
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 CertificateValidationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CertificateValidationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

CertificateValidation Resource Properties

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

Inputs

The CertificateValidation resource accepts the following input properties:

CertificateArn string
The ARN of the certificate that is being validated.
ValidationRecordFqdns List<string>
List of FQDNs that implement the validation. Only valid for DNS validation method ACM certificates. If this is set, the resource can implement additional sanity checks and has an explicit dependency on the resource that is implementing the validation
CertificateArn string
The ARN of the certificate that is being validated.
ValidationRecordFqdns []string
List of FQDNs that implement the validation. Only valid for DNS validation method ACM certificates. If this is set, the resource can implement additional sanity checks and has an explicit dependency on the resource that is implementing the validation
certificateArn string
The ARN of the certificate that is being validated.
validationRecordFqdns string[]
List of FQDNs that implement the validation. Only valid for DNS validation method ACM certificates. If this is set, the resource can implement additional sanity checks and has an explicit dependency on the resource that is implementing the validation
certificate_arn str
The ARN of the certificate that is being validated.
validation_record_fqdns Sequence[str]
List of FQDNs that implement the validation. Only valid for DNS validation method ACM certificates. If this is set, the resource can implement additional sanity checks and has an explicit dependency on the resource that is implementing the validation

Outputs

All input properties are implicitly available as output properties. Additionally, the CertificateValidation 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 CertificateValidation Resource

Get an existing CertificateValidation 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?: CertificateValidationState, opts?: CustomResourceOptions): CertificateValidation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        certificate_arn: Optional[str] = None,
        validation_record_fqdns: Optional[Sequence[str]] = None) -> CertificateValidation
func GetCertificateValidation(ctx *Context, name string, id IDInput, state *CertificateValidationState, opts ...ResourceOption) (*CertificateValidation, error)
public static CertificateValidation Get(string name, Input<string> id, CertificateValidationState? 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:

CertificateArn string
The ARN of the certificate that is being validated.
ValidationRecordFqdns List<string>
List of FQDNs that implement the validation. Only valid for DNS validation method ACM certificates. If this is set, the resource can implement additional sanity checks and has an explicit dependency on the resource that is implementing the validation
CertificateArn string
The ARN of the certificate that is being validated.
ValidationRecordFqdns []string
List of FQDNs that implement the validation. Only valid for DNS validation method ACM certificates. If this is set, the resource can implement additional sanity checks and has an explicit dependency on the resource that is implementing the validation
certificateArn string
The ARN of the certificate that is being validated.
validationRecordFqdns string[]
List of FQDNs that implement the validation. Only valid for DNS validation method ACM certificates. If this is set, the resource can implement additional sanity checks and has an explicit dependency on the resource that is implementing the validation
certificate_arn str
The ARN of the certificate that is being validated.
validation_record_fqdns Sequence[str]
List of FQDNs that implement the validation. Only valid for DNS validation method ACM certificates. If this is set, the resource can implement additional sanity checks and has an explicit dependency on the resource that is implementing the validation

Package Details

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