Terraform data blocks for Administrator Access evidence

Use Terraform to collect evidence for admin access to Application, Database, or Network

Written By Micah

If you have Terraform integrations set up for your AWS, Azure, or GCP cloud infrastructure, you can use it to easily (and automatically) collect settings and samples to satisfy requests for Administrator Access evidence.

Note: if you have customized your evidence repository, the name, description, and requirements of your evidence may be different.

As with all Terraform evidence collection, the power is in it's flexibility and configuration. With the low-code editor, you can customize what gets collected and from where, putting you in full control of the integration.

Terraform data blocks for AWS

While AWS does not provide a specific data source to retrieve a list of administrators, access to applications, resources, and services in AWS is typically managed through AWS Identity and Access Management (IAM) roles, policies, and user/group permissions.

Using IAM Group

data "aws_iam_group" "admins" {  group_name = "an_example_group_name"  # replace "an_example_group_name" with the name of your admin group}data.aws_iam_groups.admins

Using IAM Roles

data "aws_iam_roles" "admins" {  name_regex = ".*admin.*"    # use regex to select the list of roles with admin access}data.aws_iam_roles.admins

Using IAM Users

data "aws_iam_users" "admins" {  name_regex = ".*admin.*"  # use regex to select the list of users with admin access}data.aws_iam_users.admins