CP code
akamai_cp_code
Retrieve an ID for a Content Provider (CP) code.
data "akamai_cp_code" "my_cp_code" {
name = "My CP code name"
group_id = "12345"
contract_id = "C-0N7RAC7"
}
output "my_cp_code" {
value = data.akamai_cp_code.my_cp_code
}
// The example includes other data sources as dependencies.
locals {
group_name = "My group name"
cpcode_name = "My CP code name"
}
data "akamai_group" "my_group" {
group_name = local.group_name
contract_id = data.akamai_contract.my_contract.id
}
data "akamai_contract" "my_contract" {
group_name = local.group_name
}
data "akamai_cp_code" "my_cp_code" {
name = local.cpcode_name
group_id = data.akamai_group.my_group.id
contract_id = data.akamai_contract.my_contract.id
}
Changes to Outputs:
+ my_cp_code = {
+ contract_id = "C-0N7RAC7"
+ group_id = "12345"
+ id = "123456"
+ name = "My CP code name"
+ product_ids = [
+ "prd_Obj_Delivery",
]
}
Arguments
Send your group ID, contract ID, and CP code name in the body of the declaration to get a CP code ID.
Argument | Required | Description |
---|---|---|
name | ✔ | Your CP code's name. |
group_id | ✔ | Your group's ID. |
contract_id | ✔ | Your contract's ID. |
Attributes
Returned to you is the CP code's id
and a list of its product_ids
.
Attribute | Argument |
---|---|
contract_id | Your contract's ID. |
group_id | Your group's ID. |
id | Your CP code's ID. |
name | Your CP code's name. |
product_ids | A list of products for your CP code. |
Updated 4 months ago