Upload certificate
akamai_cps_upload_certificate
Upload a third-party certificate and any other files the certificate authority (CA) sent you to the Certificate Provisioning System (CPS).
The certificate and trust chain the CA gives you need to be in PEM format before you can use it in CPS. A PEM certificate is a Base64-encoded ASCII file and contains ----BEGIN CERTIFICATE-----
and -----END CERTIFICATE-----
statements.
If the CA provides you with a certificate that isn't in PEM format, you can convert it to PEM format using an SSL converter.
resource "akamai_cps_upload_certificate" "my-upload-cert" {
enrollment_id = 12345
certificate_ecdsa_pem = <<-EOT
-----BEGIN CERTIFICATE-----
nMIID <sample - removed for readability> .... nMweq
-----END CERTIFICATE-----
EOT
trust_chain_ecdsa_pem = <<-EOT
-----BEGIN CERTIFICATE-----
nMIID <sample - removed for readability> .... nMweq
-----END CERTIFICATE-----
EOT
acknowledge_post_verification_warnings = false
acknowledge_change_management = false
auto_approve_warnings = [
"CERTIFICATE_ADDED_TO_TRUST_CHAIN",
"CERTIFICATE_ALREADY_LOADED",
"CERTIFICATE_DATA_BLANK_OR_MISSING",
]
}
data "local_file" "cert" {
filename = "example_cert_ecdsa.pem"
}
data "local_file" "chain" {
filename = "example_trust_chain_ecdsa.pem"
}
resource "akamai_cps_upload_certificate" "my-upload-cert" {
depends_on = [
akamai_cps_third_party_enrollment.my-enrollment
]
enrollment_id = akamai_cps_third_party_enrollment.my-enrollment.id
certificate_ecdsa_pem = data.local_file.cert.content
trust_chain_ecdsa_pem = data.local_file.chain.content
acknowledge_post_verification_warnings = false
acknowledge_change_management = false
auto_approve_warnings = [
"CERTIFICATE_ADDED_TO_TRUST_CHAIN",
"CERTIFICATE_ALREADY_LOADED",
"CERTIFICATE_DATA_BLANK_OR_MISSING",
]
}
Arguments
Provide an enrollment ID and at least one of the PEM files to upload in the certificate_ecdsa_pem
or certificate_rsa_pem
argument. You can upload an ECDSA certificate, an RSA certificate, or both.
Argument | Required | Description |
---|---|---|
enrollment_id |
✔ | Your certificate enrollment's ID. |
certificate_ecdsa_pem |
An ECDSA certificate in PEM format you want to upload. | |
certificate_rsa_pem |
An RSA certificate in PEM format you want to upload. | |
trust_chain_ecdsa_pem |
A trust chain in PEM format for the ECDSA certificate you want to upload. | |
trust_chain_rsa_pem |
A trust chain in PEM format for the RSA certificate you want to upload. | |
acknowledge_post_verification_warnings |
Whether to acknowledge post-verification warnings defined in auto_approve_warnings . Provide true to acknowledge them. |
|
auto_approve_warnings |
A list of post-verification warning IDs you want to acknowledge automatically. To retrieve a list of warnings, use the akamai_cps_warnings data source. |
|
acknowledge_change_management |
Whether to acknowledge change management. Provide true to acknowledge that testing on staging is complete and to deploy the certificate to production. Note: Use only if the |
|
wait_for_deployment |
Whether to wait for a certificate to be deployed. Provide true to wait for its deployment. |
Attributes
There is no default standard output. Upon creation, the last line of the process log contains a success message.
Adding an output
block returns the uploaded third-party certificate details you provided on create and the computed attributes.
Attribute | Description |
---|---|
id | The data source's ID. |
unacknowledged_warnings | Indicates whether there are unacknowledged warnings for a certificate. true means there are some unacknowledged warnings. |
Updated 8 days ago