CP code
akamai_cp_code
Use the akamai_cp_code
data source to retrieve the ID for a content provider (CP) code.
Example
Basic
data "akamai_cp_code" "example" {
name = "my cpcode name"
group_id = "grp_123"
contract_id = "ctr_1-AB123"
}
Real world
This example includes other data sources as dependencies:
locals {
group_name = "example group name"
cpcode_name = "My CP code Name"
}
data "akamai_group" "example" {
group_name = local.group_name
contract_id = data.akamai_contract.example.id
}
data "akamai_contract" "example" {
group_name = local.group_name
}
data "akamai_cp_code" "example" {
name = local.cpcode_name
group_id = data.akamai_group.example.id
contract_id = data.akamai_contract.example.id
}
Argument reference
This data source supports these arguments:
name
- (Required) The name of the CP code.group_id
- (Required) The group's unique ID, including thegrp_
prefix.contract_id
- (Required) A contract's unique ID, including thectr_
prefix.
Attributes reference
This data source returns these attributes:
id
- The ID of the CP code, including thecpc_
prefix.product_ids
- An array of product IDs associated with this CP code. Each ID returned includes theprd_
prefix.
Updated 3 months ago