Groups
akamai_iam_groups
Get all groups associated with your account.
data "akamai_iam_groups" "my_groups" {
}
output "groups" {
value = data.akamai_iam_groups.my_groups
}
// First list item is a parent with no children.
// Second list item is a parent with two children.
Changes to Outputs:
+ my_groups = {
+ groups = [
+ {
+ created_by = "Akamai"
+ group_id = "12345"
+ modified_by = "Akamai"
+ name = "My parent group 1"
+ parent_group_id = "12345"
+ sub_groups = []
+ time_created = "2023-01-22T22:00:01.000Z"
+ time_modified = "2023-06-06T16:16:27.000Z"
},
+ {
+ created_by = "Akamai"
+ group_id = "54321"
+ modified_by = "Akamai"
+ name = "My parent group 2"
+ parent_group_id = "54321"
+ sub_groups = [
+ {
+ created_by = "John Smith"
+ group_id = "543210"
+ modified_by = "jsmith"
+ name = "My child group 1"
+ parent_group_id = "54321"
+ sub_groups = []
+ time_created = "2023-01-20T17:21:07.000Z"
+ time_modified = "2023-03-20T17:08:23.000Z"
},
+ {
+ created_by = "John Smith"
+ group_id = "5432100"
+ modified_by = "jsmith"
+ name = "My child group 2"
+ parent_group_id = "54321"
+ sub_groups = []
+ time_created = "2023-04-20T15:27:19.000Z"
+ time_modified = "2023-05-21T10:42:19.000Z"
},
]
+ time_created = "2023-01-22T22:00:01.000Z"
+ time_modified = "2023-06-06T16:16:27.000Z"
},
]
+ id = "akamai_iam_groups"
}
variable "group_id" {
type = string
description = "My group ID"
default = "5432100"
}
// tvars
group_id = var.group_id
Arguments
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.
Argument | Description |
---|---|
created_by | The name, company or individual, who created the group. |
group_id | Your group's ID. |
modified_by | The name, company or individual, who last updated the group. |
name | Your group's name. |
parent_group_id | The parent group's ID. |
sub_groups | A set that contains the details for any children or grandchildren. Each item in the list contains the same attributes listed here for a group. |
time_created | The group's ISO 8601 time stamp, including the time zone, upon creation. |
time_modified | The group's ISO 8601 time stamp, including the time zone, upon modification. |
Updated over 1 year ago