Carina

Resource

aws.acm.Certificate

Contains metadata about an ACM certificate. This structure is returned in the response to a DescribeCertificate request.

Post-apply read-back budget: 300 seconds.

After create or update, the host polls for domain_validation_options when DNS validation is requested.

Example

let cert = aws.acm.Certificate {
  # CloudFront viewer certificates must be requested in us-east-1.
  # cert_issued waits for issuance; downstream resources should use cert_issued.arn.
  # cert.arn skips that wait. No CertificateValidation resource is needed.
  domain_name       = 'registry.example.com'
  # DNS validation returns the CNAME published by validation_record below.
  validation_method = aws.acm.Certificate.ValidationMethod.dns

  tags = {
    Environment = 'example'
  }
}

let validation_record = aws.route53.RecordSet {
  # Replace this placeholder with the hosted zone ID for the domain.
  hosted_zone_id   = 'Z123EXAMPLE'
  # Publish the DNS challenge returned by ACM.
  name             = cert.domain_validation_options[0].resource_record.name
  # ACM's RecordType enum contains only CNAME and has its own type identity.
  type             = aws.route53.RecordSet.Type.cname
  ttl              = 60
  resource_records = [cert.domain_validation_options[0].resource_record.value]
}

let cert_issued = wait cert {
  until      = cert.status == aws.acm.Certificate.Status.issued
  depends_on = [validation_record]
  timeout    = 75min
}

Argument Reference

domain_name

Fully qualified domain name (FQDN), such as www.example.com, that you want to secure with an ACM certificate. Use an asterisk (*) to create a wildcard certificate that protects several sites in the same domain. For example, *.example.com protects www.example.com, site.example.com, and images.example.com. In compliance with RFC 5280, the length of the domain name (technically, the Common Name) that you provide cannot exceed 64 octets (characters), including periods. To add a longer domain name, specify it in the Subject Alternative Name field, which supports names up to 253 octets in length.

key_algorithm

Specifies the algorithm of the public and private key pair that your certificate uses to encrypt data. RSA is the default key algorithm for ACM certificates. Elliptic Curve Digital Signature Algorithm (ECDSA) keys are smaller, offering security comparable to RSA keys but with greater computing efficiency. However, ECDSA is not supported by all network clients. Some Amazon Web Services services may require RSA keys, or only support ECDSA keys of a particular size, while others allow the use of either RSA and ECDSA keys to ensure that compatibility is not broken. Check the requirements for the Amazon Web Services service where you plan to deploy your certificate. For more information about selecting an algorithm, see Key algorithms. Algorithms supported for an ACM certificate request include: RSA_2048 EC_prime256v1 EC_secp384r1 Other listed algorithms are for imported certificates only. When you request a private PKI certificate signed by a CA from Amazon Web Services Private CA, the specified signing algorithm family (RSA or ECDSA) must match the algorithm family of the CA's secret key. Default: RSA_2048

options

You can use this parameter to specify whether to export your certificate. Certificate transparency logging opt-out is no longer available. All public certificates are recorded in a certificate transparency log. For more information, see Certificate Transparency Logging. You can export public ACM certificates to use with Amazon Web Services services as well as outside the Amazon Web Services Cloud. For more information, see Certificate Manager exportable public certificate.

subject_alternative_names

Additional FQDNs to be included in the Subject Alternative Name extension of the ACM certificate. For example, add the name www.example.net to a certificate for which the DomainName field is www.example.com if users can reach your site by using either name. The maximum number of domain names that you can add to an ACM certificate is 100. However, the initial quota is 10 domain names. If you need more than 10 names, you must request a quota increase. For more information, see Quotas. The maximum length of a SAN DNS name is 253 octets. The name is made up of multiple labels separated by periods. No label can be longer than 63 octets. Consider the following examples: (63 octets).(63 octets).(63 octets).(61 octets) is legal because the total length is 253 octets (63+1+63+1+63+1+61) and no label exceeds 63 octets. (64 octets).(63 octets).(63 octets).(61 octets) is not legal because the total length exceeds 253 octets (64+1+63+1+63+1+61) and the first label exceeds 63 octets. (63 octets).(63 octets).(63 octets).(62 octets) is not legal because the total length of the DNS name (63+1+63+1+63+1+62) exceeds 253 octets.

validation_method

The method you want to use if you are requesting a public certificate to validate that you own or control domain. You can validate with DNS or validate with email. We recommend that you use DNS validation.

tags

The tags for the resource.

Enum Values

domain_validation_options[].resource_record.type (ResourceRecordType)

Value DSL Identifier
CNAME aws.acm.Certificate.ResourceRecordType.cname

Shorthand formats: cname or ResourceRecordType.cname

domain_validation_options[].validation_method (ValidationMethod)

Value DSL Identifier
DNS aws.acm.Certificate.DomainValidation.ValidationMethod.dns
EMAIL aws.acm.Certificate.DomainValidation.ValidationMethod.email
HTTP aws.acm.Certificate.DomainValidation.ValidationMethod.http

Shorthand formats: dns or ValidationMethod.dns

domain_validation_options[].validation_status (ValidationStatus)

Value DSL Identifier
FAILED aws.acm.Certificate.DomainValidation.ValidationStatus.failed
PENDING_VALIDATION aws.acm.Certificate.DomainValidation.ValidationStatus.pending_validation
SUCCESS aws.acm.Certificate.DomainValidation.ValidationStatus.success

Shorthand formats: failed or ValidationStatus.failed

key_algorithm (KeyAlgorithm)

Value DSL Identifier
EC_prime256v1 aws.acm.Certificate.KeyAlgorithm.ec_prime256v1
EC_secp384r1 aws.acm.Certificate.KeyAlgorithm.ec_secp384r1
RSA_2048 aws.acm.Certificate.KeyAlgorithm.rsa_2048

Shorthand formats: ec_prime256v1 or KeyAlgorithm.ec_prime256v1

options.certificate_transparency_logging_preference (CertificateTransparencyLoggingPreference)

Value DSL Identifier
DISABLED aws.acm.Certificate.CertificateOptions.CertificateTransparencyLoggingPreference.disabled
ENABLED aws.acm.Certificate.CertificateOptions.CertificateTransparencyLoggingPreference.enabled

Shorthand formats: disabled or CertificateTransparencyLoggingPreference.disabled

options.export (Export)

Value DSL Identifier
DISABLED aws.acm.Certificate.CertificateOptions.Export.disabled
ENABLED aws.acm.Certificate.CertificateOptions.Export.enabled

Shorthand formats: disabled or Export.disabled

options.validation_method (ValidationMethod)

Value DSL Identifier
DNS aws.acm.Certificate.CertificateOptions.ValidationMethod.dns
EMAIL aws.acm.Certificate.CertificateOptions.ValidationMethod.email
HTTP aws.acm.Certificate.CertificateOptions.ValidationMethod.http

Shorthand formats: dns or ValidationMethod.dns

renewal_eligibility (RenewalEligibility)

Value DSL Identifier
ELIGIBLE aws.acm.Certificate.RenewalEligibility.eligible
INELIGIBLE aws.acm.Certificate.RenewalEligibility.ineligible

Shorthand formats: eligible or RenewalEligibility.eligible

renewal_summary.domain_validation_options[].resource_record.type (ResourceRecordType)

Value DSL Identifier
CNAME aws.acm.Certificate.ResourceRecordType.cname

Shorthand formats: cname or ResourceRecordType.cname

renewal_summary.domain_validation_options[].validation_method (ValidationMethod)

Value DSL Identifier
DNS aws.acm.Certificate.RenewalSummary.DomainValidation.ValidationMethod.dns
EMAIL aws.acm.Certificate.RenewalSummary.DomainValidation.ValidationMethod.email
HTTP aws.acm.Certificate.RenewalSummary.DomainValidation.ValidationMethod.http

Shorthand formats: dns or ValidationMethod.dns

renewal_summary.domain_validation_options[].validation_status (ValidationStatus)

Value DSL Identifier
FAILED aws.acm.Certificate.RenewalSummary.DomainValidation.ValidationStatus.failed
PENDING_VALIDATION aws.acm.Certificate.RenewalSummary.DomainValidation.ValidationStatus.pending_validation
SUCCESS aws.acm.Certificate.RenewalSummary.DomainValidation.ValidationStatus.success

Shorthand formats: failed or ValidationStatus.failed

renewal_summary.renewal_status (RenewalStatus)

Value DSL Identifier
FAILED aws.acm.Certificate.RenewalSummary.RenewalStatus.failed
PENDING_AUTO_RENEWAL aws.acm.Certificate.RenewalSummary.RenewalStatus.pending_auto_renewal
PENDING_VALIDATION aws.acm.Certificate.RenewalSummary.RenewalStatus.pending_validation
SUCCESS aws.acm.Certificate.RenewalSummary.RenewalStatus.success

Shorthand formats: failed or RenewalStatus.failed

renewal_summary.renewal_status_reason (RenewalStatusReason)

Value DSL Identifier
ADDITIONAL_VERIFICATION_REQUIRED aws.acm.Certificate.RenewalSummary.RenewalStatusReason.additional_verification_required
CAA_ERROR aws.acm.Certificate.RenewalSummary.RenewalStatusReason.caa_error
DOMAIN_NOT_ALLOWED aws.acm.Certificate.RenewalSummary.RenewalStatusReason.domain_not_allowed
DOMAIN_VALIDATION_DENIED aws.acm.Certificate.RenewalSummary.RenewalStatusReason.domain_validation_denied
INVALID_PUBLIC_DOMAIN aws.acm.Certificate.RenewalSummary.RenewalStatusReason.invalid_public_domain
NO_AVAILABLE_CONTACTS aws.acm.Certificate.RenewalSummary.RenewalStatusReason.no_available_contacts
OTHER aws.acm.Certificate.RenewalSummary.RenewalStatusReason.other
PCA_ACCESS_DENIED aws.acm.Certificate.RenewalSummary.RenewalStatusReason.pca_access_denied
PCA_INVALID_ARGS aws.acm.Certificate.RenewalSummary.RenewalStatusReason.pca_invalid_args
PCA_INVALID_ARN aws.acm.Certificate.RenewalSummary.RenewalStatusReason.pca_invalid_arn
PCA_INVALID_DURATION aws.acm.Certificate.RenewalSummary.RenewalStatusReason.pca_invalid_duration
PCA_INVALID_STATE aws.acm.Certificate.RenewalSummary.RenewalStatusReason.pca_invalid_state
PCA_LIMIT_EXCEEDED aws.acm.Certificate.RenewalSummary.RenewalStatusReason.pca_limit_exceeded
PCA_NAME_CONSTRAINTS_VALIDATION aws.acm.Certificate.RenewalSummary.RenewalStatusReason.pca_name_constraints_validation
PCA_REQUEST_FAILED aws.acm.Certificate.RenewalSummary.RenewalStatusReason.pca_request_failed
PCA_RESOURCE_NOT_FOUND aws.acm.Certificate.RenewalSummary.RenewalStatusReason.pca_resource_not_found
SLR_NOT_FOUND aws.acm.Certificate.RenewalSummary.RenewalStatusReason.slr_not_found

Shorthand formats: additional_verification_required or RenewalStatusReason.additional_verification_required

status (Status)

Value DSL Identifier
EXPIRED aws.acm.Certificate.Status.expired
FAILED aws.acm.Certificate.Status.failed
INACTIVE aws.acm.Certificate.Status.inactive
ISSUED aws.acm.Certificate.Status.issued
PENDING_VALIDATION aws.acm.Certificate.Status.pending_validation
REVOKED aws.acm.Certificate.Status.revoked
VALIDATION_TIMED_OUT aws.acm.Certificate.Status.validation_timed_out

Shorthand formats: expired or Status.expired

type (Type)

Value DSL Identifier
AMAZON_ISSUED aws.acm.Certificate.Type.amazon_issued
IMPORTED aws.acm.Certificate.Type.imported
PRIVATE aws.acm.Certificate.Type.private

Shorthand formats: amazon_issued or Type.amazon_issued

validation_method (ValidationMethod)

Value DSL Identifier
DNS aws.acm.Certificate.ValidationMethod.dns
EMAIL aws.acm.Certificate.ValidationMethod.email
HTTP aws.acm.Certificate.ValidationMethod.http

Shorthand formats: dns or ValidationMethod.dns

Struct Definitions

domain_validation_options[]

Field Type Required Description
domain_name String (pattern: /^(\*\.)?(((?:[\x{30}-\x{39}\x{41}-\x{5a}\x{61}-\x{7a}][A-Za-z0-9\-]{0,61})?[A-Za-z0-9])\.)+([\x{30}-\x{39}\x{41}-\x{5a}\x{61}-\x{7a}][A-Za-z0-9\-]{0,61}[A-Za-z0-9])$/ (Full), len: 1..=253) Yes A fully qualified domain name (FQDN) in the certificate. For example, www.example.com or example.com.
http_redirect Struct(HttpRedirect) No Contains information for HTTP-based domain validation of certificates requested through Amazon CloudFront and issued by ACM. This field exists only when the certificate type is AMAZON_ISSUED and the validation method is HTTP.
resource_record Struct(ResourceRecord) No Contains the CNAME record that you add to your DNS database for domain validation. For more information, see Use DNS to Validate Domain Ownership. The CNAME information that you need does not include the name of your domain. If you include your domain name in the DNS database CNAME record, validation fails. For example, if the name is _a79865eb4cd1a6ab990a45779b4e0b96.yourdomain.com, only _a79865eb4cd1a6ab990a45779b4e0b96 must be used.
validation_domain String (pattern: /^(\*\.)?(((?:[\x{30}-\x{39}\x{41}-\x{5a}\x{61}-\x{7a}][A-Za-z0-9\-]{0,61})?[A-Za-z0-9])\.)+([\x{30}-\x{39}\x{41}-\x{5a}\x{61}-\x{7a}][A-Za-z0-9\-]{0,61}[A-Za-z0-9])$/ (Full), len: 1..=253) No The domain name that ACM used to send domain validation emails.
validation_emails List<Email (custom validator)> (ordered) No A list of email addresses that ACM used to send domain validation emails.
validation_method ValidationMethod No Specifies the domain validation method.
validation_status ValidationStatus No The validation status of the domain name. This can be one of the following values: PENDING_VALIDATION SUCCESS FAILED

domain_validation_options[].http_redirect

Field Type Required Description
redirect_from AcmCertificateValidationUrl (pattern: /^[A-Za-z][A-Za-z0-9+.-]*://[^\s\x00-\x1F\x7F/?#]+(?:[/?#][^\s\x00-\x1F\x7F]*)?\z/ (Full), custom validator) No The URL including the domain to be validated. The certificate authority sends GET requests here during validation.
redirect_to AcmCertificateValidationUrl (pattern: /^[A-Za-z][A-Za-z0-9+.-]*://[^\s\x00-\x1F\x7F/?#]+(?:[/?#][^\s\x00-\x1F\x7F]*)?\z/ (Full), custom validator) No The URL hosting the validation token. RedirectFrom must return this content or redirect here.

domain_validation_options[].resource_record

Field Type Required Description
name String (len: 1..=1024) Yes The name of the DNS record to create in your domain. This is supplied by ACM.
type ResourceRecordType Yes The type of DNS record. Currently this can be CNAME.
value String (len: 1..=1024) Yes The value of the CNAME record to add to your DNS database. This is supplied by ACM.

options

Field Type Required Description
certificate_transparency_logging_preference CertificateTransparencyLoggingPreference No This parameter has been deprecated. Certificate transparency logging opt-out is no longer available. All public certificates are recorded in a certificate transparency log.
export Export No You can opt in to allow the export of your certificates by specifying ENABLED. You cannot update the value of Export after the the certificate is created.
validation_method ValidationMethod No The domain validation method for the certificate. To migrate from email to DNS validation, specify DNS.

renewal_summary

Field Type Required Description
domain_validation_options List<Struct(DomainValidation)> (items: 1..=1000, ordered) Yes Contains information about the validation of each domain name in the certificate, as it pertains to ACM's managed renewal. This is different from the initial validation that occurs as a result of the RequestCertificate request. This field exists only when the certificate type is AMAZON_ISSUED.
renewal_status RenewalStatus Yes The status of ACM's managed renewal of the certificate.
renewal_status_reason RenewalStatusReason No The reason that a renewal request was unsuccessful.
updated_at String Yes The time at which the renewal summary was last updated.

renewal_summary.domain_validation_options[]

Field Type Required Description
domain_name String (pattern: /^(\*\.)?(((?:[\x{30}-\x{39}\x{41}-\x{5a}\x{61}-\x{7a}][A-Za-z0-9\-]{0,61})?[A-Za-z0-9])\.)+([\x{30}-\x{39}\x{41}-\x{5a}\x{61}-\x{7a}][A-Za-z0-9\-]{0,61}[A-Za-z0-9])$/ (Full), len: 1..=253) Yes A fully qualified domain name (FQDN) in the certificate. For example, www.example.com or example.com.
http_redirect Struct(HttpRedirect) No Contains information for HTTP-based domain validation of certificates requested through Amazon CloudFront and issued by ACM. This field exists only when the certificate type is AMAZON_ISSUED and the validation method is HTTP.
resource_record Struct(ResourceRecord) No Contains the CNAME record that you add to your DNS database for domain validation. For more information, see Use DNS to Validate Domain Ownership. The CNAME information that you need does not include the name of your domain. If you include your domain name in the DNS database CNAME record, validation fails. For example, if the name is _a79865eb4cd1a6ab990a45779b4e0b96.yourdomain.com, only _a79865eb4cd1a6ab990a45779b4e0b96 must be used.
validation_domain String (pattern: /^(\*\.)?(((?:[\x{30}-\x{39}\x{41}-\x{5a}\x{61}-\x{7a}][A-Za-z0-9\-]{0,61})?[A-Za-z0-9])\.)+([\x{30}-\x{39}\x{41}-\x{5a}\x{61}-\x{7a}][A-Za-z0-9\-]{0,61}[A-Za-z0-9])$/ (Full), len: 1..=253) No The domain name that ACM used to send domain validation emails.
validation_emails List<Email (custom validator)> (ordered) No A list of email addresses that ACM used to send domain validation emails.
validation_method ValidationMethod No Specifies the domain validation method.
validation_status ValidationStatus No The validation status of the domain name. This can be one of the following values: PENDING_VALIDATION SUCCESS FAILED

renewal_summary.domain_validation_options[].http_redirect

Field Type Required Description
redirect_from AcmCertificateValidationUrl (pattern: /^[A-Za-z][A-Za-z0-9+.-]*://[^\s\x00-\x1F\x7F/?#]+(?:[/?#][^\s\x00-\x1F\x7F]*)?\z/ (Full), custom validator) No The URL including the domain to be validated. The certificate authority sends GET requests here during validation.
redirect_to AcmCertificateValidationUrl (pattern: /^[A-Za-z][A-Za-z0-9+.-]*://[^\s\x00-\x1F\x7F/?#]+(?:[/?#][^\s\x00-\x1F\x7F]*)?\z/ (Full), custom validator) No The URL hosting the validation token. RedirectFrom must return this content or redirect here.

renewal_summary.domain_validation_options[].resource_record

Field Type Required Description
name String (len: 1..=1024) Yes The name of the DNS record to create in your domain. This is supplied by ACM.
type ResourceRecordType Yes The type of DNS record. Currently this can be CNAME.
value String (len: 1..=1024) Yes The value of the CNAME record to add to your DNS database. This is supplied by ACM.

Attribute Reference

certificate_arn

The Amazon Resource Name (ARN) of the certificate. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

domain_validation_options

Contains information about the initial validation of each domain name that occurs as a result of the RequestCertificate request. This field exists only when the certificate type is AMAZON_ISSUED.

renewal_eligibility

Specifies whether the certificate is eligible for renewal. At this time, only exported private certificates can be renewed with the RenewCertificate command.

renewal_summary

Contains information about the status of ACM's managed renewal for the certificate. This field exists only when the certificate type is AMAZON_ISSUED.

status

The status of the certificate. A certificate enters status PENDING_VALIDATION upon being requested, unless it fails for any of the reasons given in the troubleshooting topic Certificate request fails. ACM makes repeated attempts to validate a certificate for 72 hours and then times out. If a certificate shows status FAILED or VALIDATION_TIMED_OUT, delete the request, correct the issue with DNS validation or Email validation, and try again. If validation succeeds, the certificate enters status ISSUED.

type

The source of the certificate. For certificates provided by ACM, this value is AMAZON_ISSUED. For certificates that you imported with ImportCertificate, this value is IMPORTED. ACM does not provide managed renewal for imported certificates. For more information about the differences between certificates that you import and those that ACM provides, see Importing Certificates in the Certificate Manager User Guide.