Ensure all IAM users are members of at least one IAM group

Error: Not all IAM users are members of at least one IAM group

Bridgecrew Policy ID: BC_AWS_IAM_62
Checkov Check ID: CKV2_AWS_21
Severity: LOW

Not all IAM users are members of at least one IAM group

Description

TBA

Fix - Buildtime

Terraform

  • Resource: aws_iam_group_membership, aws_iam_group, aws_iam_user
  • Argument: users and group of aws_iam_group_membership
resource "aws_iam_group_membership" "ok_group" {
  name = "tf-testing-group-membership"

  users = [
    aws_iam_user.user_good.name,
  ]

  group = aws_iam_group.group.name
}

resource "aws_iam_group" "group" {
  name = "test-group"
}

resource "aws_iam_user" "user_good" {
  name = "test-user"
}

Did this page help you?