aws groups
This commit is contained in:
parent
333bb608f2
commit
5ce172fec3
1 changed files with 15 additions and 0 deletions
|
@ -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"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue