Skip to content

Commit

Permalink
Add dennis and jorropo as admins
Browse files Browse the repository at this point in the history
  • Loading branch information
iand committed Dec 14, 2023
1 parent 5262374 commit f37e6ce
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions tf/users.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ variable "admins" {
instance_type = "t2.small"
ami = "ami-0591c8c8aa7d9b217" # debian 11
}
"dennis" = {
key_name = "dennis"
provision_workbox = false
instance_type = "t2.small"
ami = "ami-0591c8c8aa7d9b217" # debian 11
}
"jorropo" = {
key_name = "Jorropo"
provision_workbox = false
instance_type = "t2.small"
ami = "ami-0591c8c8aa7d9b217" # debian 11
}
}
}

Expand All @@ -20,14 +32,14 @@ locals {
}


resource "aws_iam_user" "admin" {
for_each = var.admins
name = each.key
}
# resource "aws_iam_user" "admin" {
# for_each = var.admins
# name = each.key
# }

resource "aws_iam_user_policy_attachment" "admin" {
for_each = aws_iam_user.admin
user = each.value.name
for_each = var.admins
user = each.key
policy_arn = "arn:aws:iam::aws:policy/AdministratorAccess"
}

Expand Down

0 comments on commit f37e6ce

Please sign in to comment.