Groups
akamai_groups
Get a list of groups associated with your API client's credentials.
data "akamai_groups" "my_groups" {
}
output "my_groups" {
value = data.akamai_groups.my_groups
}
Changes to Outputs:
+ my_groups = {
+ groups = [
+ {
+ contract_ids = [
+ "ctr_C-0N7RAC7",
]
+ group_id = "grp_12345"
+ group_name = "My group name"
+ parent_group_id = "grp_09876"
},
+ {
+ contract_ids = [
+ "ctr_C-0N7RAC7",
]
+ group_id = "grp_54321"
+ group_name = "My group name 2"
+ parent_group_id = "grp_12345"
},
]
+ id = "example7ec3a80992d3cbad0afd253cbc8951"
}
variable "group_id" {
type = string
description = "My group ID"
default = "12345"
}
// local
group_id = data.akamai_groups.my_groups.groups[2].group_id
// tvars
group_id = var.group_id
Argument
This data source is passed empty. The config_section
argument in the Akamai provider block of your Terraform configuration provides the necessary information.
Attributes
Returned to you is a groups
set with a list of your groups and their high-level details.
Attribute | Details |
---|---|
contract_ids | A list of the contract IDs for which a given group is associated, including the ctr_ prefix. |
group_id | A group's ID, including the grp_ prefix. |
group_name | The name of a group. |
parent_group_id | The ID of the parent group. |
Updated 2 months ago