CP code

📘

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.

Retrieve details of a CP code.

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

data "akamai_reportinggroups_cp_code" "my-cp-code" {
  cp_code_id = 12345
}

output "my-cp-code" {
  value = data.akamai_reportinggroups_cp_code.my-cp-code
}
my-cp-code = {
  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"
}

Arguments

Pass a CP code ID in the data block to get its details.

Attributes

Returned to you is the CP code with its details.

NameDescription
account_idThe account'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.