GuideReference
TrainingSupportCommunity

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.

ArgumentDescription
created_byThe name, company or individual, who created the group.
group_idYour group's ID.
modified_byThe name, company or individual, who last updated the group.
nameYour group's name.
parent_group_idThe parent group's ID.
sub_groupsA 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_createdThe group's ISO 8601 time stamp, including the time zone, upon creation.
time_modifiedThe group's ISO 8601 time stamp, including the time zone, upon modification.