Hostnames

akamai_property_hostnames

Get a given property's hostnames and certificate statuses.

🚧

To view Enhanced TLS hostnames, you need at least Secure Site Delivery CNAMEs - View only access.

Use the roles data source to determine your access level.

data "akamai_property_hostnames" "my-property-hostnames" {
  group_id    = "12345"
  contract_id = "C-0N7RAC7"
  property_id = "12345"
  version     = 1
}

output "my-property-hostnames" {
  value = data.akamai_property_hostnames.my-property-hostnames
}
+ my-property-hostnames = {
      + contract_id = "C-0N7RAC7"
      + group_id    = "12345"
      + hostname_bucket = null
      + hostnames   = [
          + {
              + cert_provisioning_type = "DEFAULT"
              + cert_status            = [
                  + {
                      + hostname          = "_acme-challenge.example.com"
                      + production_status = "ACTIVE"
                      + staging_status    = "ACTIVE"
                      + target            = "ac.123456a1234abc1abcdefg12345a1234.exammple.com.validate-akdv.net"
                    },
                ]
              + cname_from             = "example.com"
              + cname_to               = "example.com.edgesuite.net"
              + cname_type             = "EDGE_HOSTNAME"
              + edge_hostname_id       = "ehn_12345"
            },
        ]
      + id          = "prp_123451"
      + property_id = "prp_12345"
      + version     = 1
    }
Changes to Outputs:
  + my-property-hostnames = {
      + contract_id     = "C-0N7RAC7"
      + filter_pending_default_certs = false
      + group_id        = "12345"
      + hostname_bucket = [
          + {
              + cert_status            = [
                  + {
                      + hostname          = "_acme-challenge.www.example.com"
                      + production_status = "PENDING"
                      + staging_status    = "PENDING"
                      + target            = "ac.123456a1234abc1abcdefg12345a1234.www.example.com.validate-akdv.net"
                    },
                ]
              + cname_from                  = "example.com"
              + cname_type                  = "EDGE_HOSTNAME"
              + production_cert_type        = "DEFAULT"
              + production_cname_to         = "example.com.edgesuite.net"
              + production_edge_hostname_id = "ehn_12345"
              + staging_cert_type           = "CPS_MANAGED"
              + staging_cname_to            = "other.example.com.edgesuite.net"
              + staging_edge_hostname_id    = "ehn_98765"
            },
        ]
      + hostnames       = null
      + id              = "prp_12345"
      + property_id     = "prp_12345"
      + version         = 1
    }

Arguments

Send your contract, group, and property IDs in the declaration to get hostname information.

ArgumentRequiredDescription
contract_id✔️Your contract's ID.
group_id✔️Your group's ID.
property_id✔️Your property's ID.
versionApplies only to traditional properties. Your property's version number. If no value is passed, the information returned is for the latest version.

Note: The version value is ignored for hostname bucket properties if provided.
filter_pending_default_certsWhen set to true, the response includes the DEFAULT certificates whose activation status on the staging or production network isPENDING. Defaults to false if not set.

Attributes

Returned to you is a computed set with details of your property's hostnames.

Attribute Description
contract_id The contract's ID.
group_id The group's ID.
id The data source's ID, consisting of the property's ID and the property's version number. For properties of the HOSTNAME_BUCKET type, it consists only of the property's ID.
property_id The property's ID.
version The property's version number.
hostnames A set of your property's hostnames.
  • cert_provisioning_type. A certificate's provisioning type. Either CPS_MANAGED for custom provisioned certificates or DEFAULT for automatically provisioned certificates.
    Note: When the DEFAULT certificate's production or staging status is PENDING, EXPIRING_SOON_NEEDS_VALIDATION, or EXPIRED_NEEDS_VALIDATION, perform domain validation to prove you control the domain. You can do this by adding a CNAME record to your DNS.
  • cert_status. A DEFAULT certificate's status details.
    • hostname. The hostname part of the CNAME record used to validate the certificate's domain.
    • production_status. The certificate's deployment status on the production network.
    • staging_status. The certificate's deployment status on the staging network.
    • target. The destination part of the CNAME record used to validate the certificate's domain.
  • cname_from. A hostname's origin.
  • cname_to. The edge hostname you point the property hostname to so that you can start serving traffic through Akamai servers.
  • cname_type. A hostname's CNAME type. Supports only the EDGE_HOSTNAME value.
  • edge_hostname_id. An edge hostname's ID, including the ehn_ prefix.
hostname_bucket A set of hostnames if your property is of the HOSTNAME_BUCKET type.
  • cert_status. A DEFAULT certificate's status details.
    • hostname. The hostname part of the CNAME record used to validate the certificate's domain.
    • production_status. The certificate's deployment status on the production network.
    • staging_status. The certificate's deployment status on the staging network.
    • target. The destination part of the CNAME record used to validate the certificate's domain.
  • cname_from. A hostname's origin.
  • cname_type. A hostname's CNAME type. Supports only the EDGE_HOSTNAME value.
  • production_cert_type. A certificate's provisioning type used on the production network. Either CPS_MANAGED for custom provisioned certificates or DEFAULT for automatically provisioned certificates.
  • production_cname_to. The edge hostname you point the property hostname to on the production network so that you can start serving traffic through Akamai servers.
  • production_edge_hostname_id. An edge hostname's ID used on the production network, including the ehn_ prefix.
  • staging_cert_type. A certificate's provisioning type used on the staging network. Either CPS_MANAGED for custom provisioned certificates or DEFAULT for automatically provisioned certificates.
  • staging_cname_to. The edge hostname you point the property hostname to on the staging network so that you can start serving traffic through Akamai servers.
  • staging_edge_hostname_id. An edge hostname's ID used on the staging network, including the ehn_ prefix.