CP codes

📘

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 details of all CP codes available to you.

To create a new CP code, use the akamai_cp_code resource from the Property Manager subprovider.

data "akamai_reportinggroups_cp_codes" "my-cp-codes" {
  contract_id  = "C-0N7RAC7"
  group_id     = "54321"
  product_id   = "ObjectDelivery::ObjectDelivery"
  cp_code_name = "My CP code"
}

output "my-cp-codes" {
  value = data.akamai_reportinggroups_cp_codes.my-cp-codes
}
my-cp-codes = {
  contract_id  = "C-0N7RAC7"
  cp_code_name = "My CP code"
  cp_codes = [
    {
      access_group = {
        contract_id = "C-0N7RAC7"
        group_id    = "54321"
      }
      account_id = "A-CCT1234"
      contracts = [
        {
          contract_id = "C-0N7RAC7"
          status      = "ongoing"
        },
      ]
      cp_code_id        = 12345
      default_time_zone = "GMT 0 (Greenwich Mean Time)"
      name              = "My CP code"
      override_time_zone = {
        time_zone_id    = "0"
        time_zone_value = "GMT 0 (Greenwich Mean Time)"
      }
      products = [
        {
          product_id   = "ObjectDelivery::ObjectDelivery"
          product_name = "Object Delivery"
        },
      ]
      purgeable = true
      type      = "Regular"
    }
  ]
  group_id   = "54321"
  product_id = "ObjectDelivery::ObjectDelivery"
}

Arguments

Leave the data source empty to return all CP codes or provide optional arguments to filter your results.

NameRequiredDescription
contract_idA contract's ID to filter data by.
group_idAn access group's ID to filter data by.
product_idA product's ID to filter data by. To get the product IDs, run the List products within a reporting group operation.
cp_code_nameA CP code's name to filter data by.

Attributes

Returned to you is the set of cp_codes with their details.

NameDescription
account_idThe account's ID.
cp_code_idThe CP code's ID.
nameThe name of the CP code.
purgeableWhen true, you can purge the content cached by the CP code.
default_time_zoneThe default GMT time zone of the CP code.
override_time_zoneThe override GMT time zone that overrides the default time zone of the CP code.

  • time_zone_id. The GMT time zone's ID.

  • time_zone_value. The GMT time zone's offset value.
typeWhether the CP code supports serving traffic from China, or Regular traffic elsewhere.
contractsA list of contracts assigned to the CP code.

  • contract_id. The contract's ID.

  • status. The contract's status.
productsA list of products assigned to the CP code.

  • product_id. The product's ID.

  • product_name. A human-readable name for the product.
access_groupA group that controls access to specific CP codes.

  • contract_id. The contract's ID.

  • group_id. The access control group's ID. May be null if no single access group applies.