Skip to content

Commit 35daa17

Browse files
authored
fix: Fix custom policies (#87)
Fixes a bug where adding custom policies would instead add the AdministratorAccess policy.
1 parent 758cad9 commit 35daa17

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

main.tf

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,8 @@ resource "aws_iam_role_policy_attachment" "s3_full_access" {
9090
resource "aws_iam_role_policy_attachment" "custom" {
9191
count = local.create_iam_role ? length(var.iam_role_policy_arns) : 0
9292

93-
role = aws_iam_role.github[0].id
94-
policy_arn = format(
95-
"arn:%v:iam::aws:policy/AdministratorAccess",
96-
data.aws_partition.this[0].partition,
97-
)
93+
policy_arn = var.iam_role_policy_arns[count.index]
94+
role = aws_iam_role.github[0].id
9895
}
9996

10097
resource "aws_iam_openid_connect_provider" "github" {

0 commit comments

Comments
 (0)