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 90a08e3 commit 86b71c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions role.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ resource "aws_iam_role" "role" {

# moved from inline policy
resource "aws_iam_role_policy" "role" {
for_each = var.create ? 1 : 0
role = try(aws_iam_role.role[0].id, null)
policy = data.aws_iam_policy_document.lambda_policy.json
name = var.name
count = var.create ? 1 : 0
role = try(aws_iam_role.role[0].id, null)
policy = data.aws_iam_policy_document.lambda_policy.json
name = var.name
}

resource "aws_iam_role_policy_attachment" "role" {
Expand Down

0 comments on commit 86b71c2

Please sign in to comment.