GuideReference
TrainingSupportCommunity
Guide

Accessible groups

akamai_iam_accessible_groups

Get a list of the groups a given user can access.

data "akamai_iam_accessible_groups" "my_accessible_groups" {
  username = "jsmith@email.com"
}

output "my_accessible_groups" {
  value = data.akamai_iam_accessible_groups.my_accessible_groups
}
Changes to Outputs:
  + my_accessible_groups = {
      + accessible_groups = [
          + {
              + group_id         = 12345
              + group_name       = "My group"
              + is_blocked       = false
              + role_description = "This role provides the maximum access to users. An Administrator can perform admin tasks such as creating users and groups; configuration-related tasks such as creating and editing configurations; publishing tasks"
              + role_id          = 3
              + role_name        = "Admin"
              + sub_groups       = [
                  + {
                      + group_id        = 23456
                      + group_name      = "jsmith"
                      + parent_group_id = 12345
                      + sub_groups      = []
                    },
                  + {
                      + group_id        = 98765
                      + group_name      = "My other group"
                      + parent_group_id = 12345
                      + sub_groups      = [
                          + {
                              + group_id        = 23456
                              + group_name      = "My subgroup"
                              + parent_group_id = 98765
                              + sub_groups      = []
                            },
                        ]
                    },
                ]
            },
        ]
      + username          = "jsmith@email.com"
    }

Argument

Pass a user's username as an argument in the data block to get their group information.

Attributes

Returned to you is an accessible_groups set with details about the given user's groups.

AttributeDescription
group_idThe group's ID.
group_nameThe group's name.
is_blockedWhether the user is blocked from the group.
role_descriptionA human-readable note about the role.
role_idThe role's ID.
sub_groupsA list of a parent group's child groups. Contains:
  • group_id. The group's ID.
  • group_name. The group's name.
  • parent_group_id. The group's parent group ID.
  • sub_groups. A list of a child group's subgroups, if any.