Skip to content

Commit

Permalink
chore: removed dgs iam users (#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-calabrese authored Jun 13, 2024
1 parent 66da6a8 commit 4028890
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 30 deletions.
5 changes: 5 additions & 0 deletions .changeset/hungry-otters-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"infrastructure": minor
---

Removed DGS developers IAM users
11 changes: 0 additions & 11 deletions apps/infrastructure/src/modules/core/iam_group.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@ resource "aws_iam_group" "developers_read_only" {
name = "developers_read_only"
}

# IAM Group Membership - DGS
resource "aws_iam_group_membership" "dgs" {
name = "DGS"

users = [
aws_iam_user.mauro_dandrea.name
]

group = aws_iam_group.developers_read_only.name
}

resource "aws_iam_group_policy_attachment" "read_only" {
group = aws_iam_group.developers_read_only.name
# The AWS ReadOnly Access Policy
Expand Down
19 changes: 0 additions & 19 deletions apps/infrastructure/src/modules/core/iam_user.tf
Original file line number Diff line number Diff line change
@@ -1,19 +0,0 @@
resource "aws_iam_user" "mauro_dandrea" {
# This force the deletion of the user and its login profile
# because we manually give access to the console
force_destroy = true

name = "[email protected]"

tags = {
Company = "DGS"
}
}

# Allow IAM User to change the password
# Attach IAM User policy because with IAM Group policy we have the following error
# Error: deleting IAM User DeleteConflict: Cannot delete entity, must delete login profile first.
resource "aws_iam_user_policy_attachment" "change_password" {
user = aws_iam_user.mauro_dandrea.name
policy_arn = "arn:aws:iam::aws:policy/IAMUserChangePassword"
}

0 comments on commit 4028890

Please sign in to comment.