Account hostnames

akamai_property_account_hostnames

📘

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.

List active hostnames for all properties available under your account.

data "akamai_property_account_hostnames" "my-account-hostnames" {}

output "my-account-hostnames" {
  value = data.akamai_property_account_hostnames.my-account-hostnames
}
data "akamai_property_account_hostnames" "my-account-hostnames" {
  contract_id = "C-0N7RAC7"
  group_id    = "12345"
  hostname    = "example.com"
  cname_to    = "example.com.edgesuite.net"
  network     = "STAGING"
}

output "my-account-hostnames" {
  value = data.akamai_property_account_hostnames.my-account-hostnames
}
my-account-hostnames = {
  account_id     = "act_A-CCT1234"
  available_sort = [
    "hostname:a",
    "hostname:d",
  ]
  cname_to       = null
  contract_id    = null
  current_sort   = "hostname:a"
  default_sort   = "hostname:a"
  group_id       = null
  hostname       = null
  hostnames      = [
    {
      cname_from                  = "example-1.com"
      contract_id                 = "ctr_A-CCT1234"
      group_id                    = "grp_12345"
      latest_version              = 1
      production_cert_type        = null
      production_cname_to         = null
      production_cname_type       = null
      production_edge_hostname_id = null
      production_product_id       = null
      property_id                 = "prp_12345"
      property_name               = "my-property-1"
      property_type               = "TRADITIONAL"
      staging_cert_type           = "CPS_MANAGED"
      staging_cname_to            = "example-1.com.edgesuite.net"
      staging_cname_type          = "EDGE_HOSTNAME"
      staging_edge_hostname_id    = "ehn_12345"
      staging_product_id          = "prd_Obj_Delivery"
    },
    {
      cname_from                  = "example-2.com"
      contract_id                 = "ctr_C-0N7RAC7"
      group_id                    = "grp_98765"
      latest_version              = 2
      production_cert_type        = "DEFAULT"
      production_cname_to         = "example-2.com.edgekey.net"
      production_cname_type       = "EDGE_HOSTNAME"
      production_edge_hostname_id = "ehn_98765"
      production_product_id       = "prd_Web_App_Accel"
      property_id                 = "prp_98765"
      property_name               = "my-property-2"
      property_type               = "TRADITIONAL"
      staging_cert_type           = null
      staging_cname_to            = null
      staging_cname_type          = null
      staging_edge_hostname_id    = null
      staging_product_id          = null
    },
  ]
  network        = null
  sort           = null
}
my-account-hostnames = {
  account_id     = "act_A-CCT1234"
  available_sort = [
    "hostname:a",
    "hostname:d",
  ]
  cname_to       = "example.com.edgesuite.net"
  contract_id    = "C-0N7RAC7"
  current_sort   = "hostname:a"
  default_sort   = "hostname:a"
  group_id       = "12345"
  hostname       = "example.com"
  hostnames      = [
    {
      cname_from                  = "example.com"
      contract_id                 = "ctr_C-0N7RAC7"
      group_id                    = "grp_12345"
      latest_version              = 1
      production_cert_type        = null
      production_cname_to         = null
      production_cname_type       = null
      production_edge_hostname_id = null
      production_product_id       = null
      property_id                 = "prp_12345"
      property_name               = "my-property"
      property_type               = "TRADITIONAL"
      staging_cert_type           = "CPS_MANAGED"
      staging_cname_to            = "example.com.edgesuite.net"
      staging_cname_type          = "EDGE_HOSTNAME"
      staging_edge_hostname_id    = "ehn_12345"
      staging_product_id          = "prd_Obj_Delivery"
    },
  ]
  network        = "STAGING"
  sort           = null
}

Arguments

Pass the data source empty or use optional arguments to sort and filter the results.

ArgumentRequiredDescription
contract_idFilters the results by contract's ID. If using it, it must be provided along wth the group_id.
group_idFilters the results by group's ID. If using it, it must be provided along wth the contract_id.
hostnameFilters the results by cname_from. Supports wildcard matches with *.
cname_toFilters the results by edge hostname. Supports wildcard matches with *.
networkFilters the results by the network of activated hostnames, either STAGING or PRODUCTION.
sortSorts the results based on the cname_from value, either hostname:a for ascending order or hostname:d for descending order. The default is hostname:a.

Attributes

Returned to you are active hostnames.

Attribute Description
account_id Your account's ID.
available_sort A list of available sort options.
current_sort The current sort order applied to the results.
default_sort The default sort order for the results.
hostnames A list of active property hostnames. Each property hostname record includes:
  • contract_id. The contract's ID.
  • group_id. The group's ID.
  • cname_from. A hostname's origin.
  • latest_version. The most recent version of the property.
  • production_cert_type. A certificate's provisioning type used on the production network. Possible values are:
    • CPS_MANAGED for custom certificates you provision with Certificate Provisioning System (CPS).
    • CCM for custom certificates you provision with Cloud Certificate Manager (CCM).
    • DEFAULT for certificates provisioned automatically.
  • 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_cname_type. A hostname's CNAME type used on the production network, either EDGE_HOSTNAME or CUSTOM.
  • production_edge_hostname_id. An edge hostname's ID used on the production network, including the ehn_ prefix.
  • production_product_id. The product's ID used on the production network.
  • property_id. The property's ID.
  • property_name. The property's name.
  • property_type. The property's type.
  • staging_cert_type. A certificate's provisioning type used on the staging network. Possible values are:
    • CPS_MANAGED for custom certificates you provision with Certificate Provisioning System (CPS).
    • CCM for custom certificates you provision with Cloud Certificate Manager (CCM).
    • DEFAULT for certificates provisioned automatically.
  • 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_cname_type. A hostname's CNAME type used on the staging network, either EDGE_HOSTNAME or CUSTOM.
  • staging_edge_hostname_id. An edge hostname's ID used on the staging network, including the ehn_ prefix.
  • staging_product_id. The product's ID used on the staging network.