1
0
Fork 0

aws groups

This commit is contained in:
Cedric Girard 2020-05-13 14:32:09 +02:00
parent 333bb608f2
commit 5ce172fec3
Signed by: X-dark
GPG key ID: E7D0E125DB9519E4

View file

@ -10,3 +10,18 @@ resource "aws_iam_user_policy_attachment" "policy-user1" {
user = aws_iam_user.user1.name user = aws_iam_user.user1.name
policy_arn = "arn:aws:iam::aws:policy/AdministratorAccess" policy_arn = "arn:aws:iam::aws:policy/AdministratorAccess"
} }
resource "aws_iam_group" "group1" {
name = "cedric-group1"
}
resource "aws_iam_group_policy_attachment" "policy-group1" {
group = aws_iam_group.group1.name
policy_arn = "arn:aws:iam::aws:policy/AmazonEC2FullAccess"
}
resource "aws_iam_group_membership" "group1-user1" {
users = [ aws_iam_user.user1.name ]
group = aws_iam_group.group1.name
name = "user1-group1-membership"
}