Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Jan 3, 2025
1 parent 86b71c2 commit 3ff5647
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion role.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ resource "aws_iam_role_policy" "role" {

resource "aws_iam_role_policy_attachment" "role" {
for_each = var.create ? toset([for k, v in data.aws_iam_policy.lambda_policies : v.arn]) : toset([])
role = try(aws_iam_role.role[0].id, null)
policy_arn = each.value
}


data "aws_iam_policy" "lambda_policies" {
for_each = toset(local.lambda_policies)
name = each.key
Expand Down

0 comments on commit 3ff5647

Please sign in to comment.