AWS ACM PCA Certificate Authority
This page shows how to write Terraform and CloudFormation for ACM PCA Certificate Authority and write them securely.
aws_acmpca_certificate_authority (Terraform)
The Certificate Authority in ACM PCA can be configured in Terraform with the resource name aws_acmpca_certificate_authority. The following sections describe 5 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_acmpca_certificate_authority" "private_ca_noUsage" {
certificate_authority_configuration {
key_algorithm = "RSA_4096"
signing_algorithm = "SHA512WITHRSA"
subject {
common_name = "private-ca.com"
resource "aws_acmpca_certificate_authority" "private_ca_noUsage" {
certificate_authority_configuration {
key_algorithm = "RSA_4096"
signing_algorithm = "SHA512WITHRSA"
subject {
common_name = "private-ca.com"
resource "aws_acmpca_certificate_authority" "example" {
certificate_authority_configuration {
key_algorithm = "RSA_4096"
signing_algorithm = "SHA512WITHRSA"
subject {
resource "aws_acmpca_certificate_authority" "example" {
certificate_authority_configuration {
key_algorithm = "RSA_4096"
signing_algorithm = "SHA512WITHRSA"
subject {
resource "aws_acmpca_certificate_authority" "example" {
certificate_authority_configuration {
key_algorithm = "RSA_4096"
signing_algorithm = "SHA512WITHRSA"
subject {
Parameters
-
arnoptional computed - string -
certificateoptional computed - string -
certificate_chainoptional computed - string -
certificate_signing_requestoptional computed - string -
enabledoptional - bool -
idoptional computed - string -
not_afteroptional computed - string -
not_beforeoptional computed - string -
permanent_deletion_time_in_daysoptional - number -
serialoptional computed - string -
statusoptional computed - string -
tagsoptional - map from string to string -
typeoptional - string -
certificate_authority_configurationlist block-
key_algorithmrequired - string -
signing_algorithmrequired - string -
subjectlist block-
common_nameoptional - string -
countryoptional - string -
distinguished_name_qualifieroptional - string -
generation_qualifieroptional - string -
given_nameoptional - string -
initialsoptional - string -
localityoptional - string -
organizationoptional - string -
organizational_unitoptional - string -
pseudonymoptional - string -
stateoptional - string -
surnameoptional - string -
titleoptional - string
-
-
-
revocation_configurationlist block-
crl_configurationlist block-
custom_cnameoptional - string -
enabledoptional - bool -
expiration_in_daysrequired - number -
s3_bucket_nameoptional - string
-
-
-
timeoutssingle block-
createoptional - string
-
Explanation in Terraform Registry
Provides a resource to manage AWS Certificate Manager Private Certificate Authorities (ACM PCA Certificate Authorities).
NOTE: Creating this resource will leave the certificate authority in a
PENDING_CERTIFICATEstatus, which means it cannot yet issue certificates. To complete this setup, you must fully sign the certificate authority CSR available in thecertificate_signing_requestattribute and import the signed certificate outside of Terraform. Terraform can support another resource to manage that workflow automatically in the future.
AWS::ACMPCA::CertificateAuthority (CloudFormation)
The CertificateAuthority in ACMPCA can be configured in CloudFormation with the resource name AWS::ACMPCA::CertificateAuthority. The following sections describe 9 examples of how to use the resource and its parameters.
Example Usage from GitHub
Type: AWS::ACMPCA::CertificateAuthority
Properties:
Type: ROOT
KeyAlgorithm: RSA_2048
SigningAlgorithm: SHA256WITHRSA
Subject:
Type: AWS::ACMPCA::CertificateAuthority
Properties:
Type: ROOT
KeyAlgorithm: RSA_2048
SigningAlgorithm: SHA256WITHRSA
Subject:
Type: 'AWS::ACMPCA::CertificateAuthority'
Properties:
Type: ROOT
KeyAlgorithm: RSA_2048
SigningAlgorithm: SHA256WITHRSA
Subject:
Type: AWS::ACMPCA::CertificateAuthority
Properties:
Type: ROOT
KeyAlgorithm: RSA_2048
SigningAlgorithm: SHA256WITHRSA
Subject:
Type: AWS::ACMPCA::CertificateAuthority
Properties:
Type: ROOT
KeyAlgorithm: RSA_2048
SigningAlgorithm: SHA256WITHRSA
Subject:
"Type": "AWS::ACMPCA::CertificateAuthority",
"Properties": {
"KeyAlgorithm": "RSA_2048",
"RevocationConfiguration": {
"CrlConfiguration": {
"Enabled": false
"resourceType": "AWS::ACMPCA::CertificateAuthority",
"filePath": null
},
{
"resourceType": "AWS::ACMPCA::CertificateAuthorityActivation",
"filePath": null
"AWS::ACMPCA::CertificateAuthority.Subject": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificateauthority-subject.html",
"Properties": {
"Country": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificateauthority-subject.html#cfn-acmpca-certificateauthority-subject-country",
"UpdateType": "Immutable",
"AWS::ACMPCA::CertificateAuthority": {
"Type": "AWS::ACMPCA::CertificateAuthority",
"Properties": {}
},
"AWS::GlobalAccelerator::Accelerator": {
"Type": "AWS::GlobalAccelerator::Accelerator",
Parameters
-
Typerequired - String -
KeyAlgorithmrequired - String -
SigningAlgorithmrequired - String -
Subjectrequired - Subject -
RevocationConfigurationoptional - RevocationConfiguration -
Tagsoptional - List of Tag -
CsrExtensionsoptional - CsrExtensions -
KeyStorageSecurityStandardoptional - String
Explanation in CloudFormation Registry
Use the
AWS::ACMPCA::CertificateAuthorityresource to create a private CA. Once the CA exists, you can use theAWS::ACMPCA::Certificateresource to issue a new CA certificate. Alternatively, you can issue a CA certificate using an on-premises CA, and then use theAWS::ACMPCA::CertificateAuthorityActivationresource to import the new CA certificate and activate the CA.Note Before removing a
AWS::ACMPCA::CertificateAuthorityresource from the CloudFormation stack, disable the affected CA. Otherwise, the action will fail. You can disable the CA by removing its associatedAWS::ACMPCA::CertificateAuthorityActivationresource from CloudFormation.
Frequently asked questions
What is AWS ACM PCA Certificate Authority?
AWS ACM PCA Certificate Authority is a resource for ACM PCA of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS ACM PCA Certificate Authority?
For Terraform, the gilyas/infracost, infracost/infracost and DavidDikker/endgame source code examples are useful. See the Terraform Example section for further details.
For CloudFormation, the awsandy/ecs-workshop, saaish/AppMesh and gmcorral/acm-tools source code examples are useful. See the CloudFormation Example section for further details.