Skip to content

Commit e54f538

Browse files
committed
Previous push rejected for deprecated aws resource. Fixed, and aligned cross-reference.
1 parent f2eb239 commit e54f538

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

terraform/aws-custom-policies.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module "aws_custom_policies" {
1111
}
1212
"IncubatorTfPlanSecretsRead" = {
1313
description = "Allows incubator tf plan role to read specific Secrets Manager secrets needed for terraform plan"
14-
filename = "incubator-tf-plan-secrets-read-policy.json"
14+
filename = "tf-plan-scoped.json"
1515
}
1616
}
1717
}

terraform/modules/aws-gha-oidc-providers/main.tf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ resource "aws_iam_openid_connect_provider" "github_actions" {
5050

5151
resource "aws_iam_role" "github_actions_oidc" {
5252

53-
name = var.role_name
54-
managed_policy_arns = var.policy_arns
53+
name = var.role_name
5554

5655
assume_role_policy = jsonencode({
5756
"Version" : "2012-10-17",
@@ -71,4 +70,11 @@ resource "aws_iam_role" "github_actions_oidc" {
7170
}
7271
}]
7372
})
73+
}
74+
75+
resource "aws_iam_role_policy_attachment" "github_actions_oidc" {
76+
for_each = toset(var.policy_arns)
77+
78+
role = aws_iam_role.github_actions_oidc.name
79+
policy_arn = each.value
7480
}

0 commit comments

Comments
 (0)