Certificate

akamai_cloudcertificates_certificate

📘

Beta

Hello. Just a note to let you know the underlying API on which this data source is built is general release and has been vetted, but because this is a new feature for our Terraform provider, we've given it beta label.

This status just means we've paused for a bit to get your feedback to make sure this data source works like you need and expect.

Get details of a specific certificate.

data "akamai_cloudcertificates_certificate" "my-cert" {
  certificate_id            = "12345"
  include_hostname_bindings = true
}

output "my-cert" {
  value = data.akamai_cloudcertificates_certificate.my-cert
}
my-cert = {
  account_id                               = "A-CCT1234"
  bindings                                 = [
    {
      certificate_id = "12345"
      hostname       = "example.com"
      network        = "STAGING"
      resource_type  = "CDN_HOSTNAME"
    },
  ]
  certificate_id                           = "12345"
  certificate_name                         = "my-cert"
  certificate_status                       = "ACTIVE"
  certificate_type                         = "THIRD_PARTY"
  contract_id                              = "C-0N7RAC7"
  created_by                               = "jsmith"
  created_date                             = "2025-10-24T17:10:47.940678Z"
  csr_expiration_date                      = "2026-12-26T17:10:48Z"
  csr_pem                                  = <<-EOT
    -----BEGIN CERTIFICATE REQUEST-----
    MIID <sample - removed for readability> .... Mweq
    -----END CERTIFICATE REQUEST-----
  EOT
  include_hostname_bindings                = true
  key_size                                 = "P-256"
  key_type                                 = "ECDSA"
  modified_by                              = "jsmith"
  modified_date                            = "2025-10-24T17:14:47.941736Z"
  sans                                     = [
    "example.com",
  ]
  secure_network                           = "ENHANCED_TLS"
  signed_certificate_issuer                = "CN=example.com CA,O=Main Street Corporation,C=US"
  signed_certificate_not_valid_after_date  = "2026-01-22T23:59:59Z"
  signed_certificate_not_valid_before_date = "2025-10-24T00:00:00Z"
  signed_certificate_pem                   = <<-EOT
    -----BEGIN CERTIFICATE-----
    MIID <sample - removed for readability> .... Mweq
    -----END CERTIFICATE-----
  EOT
  signed_certificate_serial_number         = "a1:23:4b:56:78:9c:0d:12:e3:45:67:89:f0:1g:hi:jk"
  signed_certificate_sha256_fingerprint    = "A1:23:4B:5C:67:89:00:12:3D:45:F6:G7:89:HI:J0:K1:L2:M3:45:67:NO"
  subject                                  = {
    common_name  = "example.com"
    country      = "US"
    locality     = "Cambridge"
    organization = "Main Street Corporation"
    state        = "MA"
  }
  trust_chain_pem                          = <<-EOT
    -----BEGIN CERTIFICATE-----
    MIID <sample - removed for readability> .... Mweq
    -----END CERTIFICATE-----
  EOT
}

Arguments

Pass the certificate's ID in the data block to get its details. You can optionally pass the include_hostname_bindings to also return hostname bindings.

ArgumentRequiredDescription
certificate_idYour certificate's ID.
include_hostname_bindingsWhen true, it returns also hostname bindings for your certificate.

Attributes

Returned to you are the certificate's details.

Attribute Description
account_id The account's ID.
contract_id The contract's ID.
certificate_id The certificate's ID.
certificate_name The certificate's name.
certificate_status The certificate's status. Possible values are:
  • CSR_READY. The CSR generation is complete and available for download.
  • READY_FOR_USE. The signed certificate, with or without its trust chain, has been accepted and is now ready for use.
  • ACTIVE. The certificate is bound to a property hostname and is being used on one or more networks.
certificate_type The certificate type. This attribute populates only with the THIRD_PARTY value.
created_by The user who created the certificate.
created_date The timestamp indicating when the certificate was created.
csr_expiration_date The timestamp indicating when the CSR will expire.
csr_pem A text representation of the certificate signing request (CSR) in PEM format.
key_size Your certificate's key size. Possible values are:
  • 2048 for the RSA key type.
  • P-256 for the ECDSA key type.
key_type Your certificate's key type, either RSA or ECDSA.
modified_by The user who modified the certificate.
modified_date The timestamp indicating when the certificate was modified.
sans A list of the subject alternative names (SANs) secured by a certificate.
secure_network The type of security on a deployment network. Only ENHANCED_TLS is supported.
signed_certificate_not_valid_after_date The timestamp indicating the end of the signed certificate's valid period.
signed_certificate_not_valid_before_date The timestamp indicating the start of the signed certificate's valid period.
signed_certificate_serial_number The signed certificate's serial number in hex format.
signed_certificate_sha256_fingerprint The signed certificate's SHA-256 fingerprint.
signed_certificate_issuer The signed certificate's issuer field.
signed_certificate_pem The PEM-encoded signed certificate you uploaded.
trust_chain_pem The PEM-encoded trust chain for the signed certificate.
subject Subject fields as defined in X.509 certificates (RFC 5280). Includes:
  • common_name. A fully qualified domain name (FQDN) or other name associated with the subject.
  • country. A two-letter ISO 3166 code for the country where your organization resides.
  • locality. The city where your organization resides.
  • organization. The name of your business, organization, or company.
  • state. Your organization's region, typically a state or province.
bindings The certificate's hostname bindings. Each binding record includes:
  • certificate_id. The certificate's ID.
  • hostname. The hostname on the Akamai CDN the certificate applies to.
  • network. The deployment network, either STAGING or PRODUCTION, on which the certificate is active for a property version
  • resource_type. The resource type this binding applies to. Currently, only CDN_HOSTNAME is available.