Last active
May 28, 2020 15:00
-
-
Save dmlayton/e7eea84bc1a0ba57871f188b5aff82ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_iam_user" "client" { | |
count = length(var.users) | |
name = element(var.users, count.index) | |
} | |
resource "aws_iam_access_key" "client" { | |
count = length(var.users) | |
user = element(aws_iam_user.client, count.index).name | |
} | |
resource "aws_iam_group_membership" "client" { | |
name = "${var.client.name}-membership" | |
group = var.client.name | |
users = aws_iam_user.client[*].name | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment