Skip to content

Commit

Permalink
Fixing for_each looping when there's no target
Browse files Browse the repository at this point in the history
  • Loading branch information
julialawrence committed Jul 9, 2024
1 parent f89b071 commit 683c829
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terraform/aws/analytical-platform/oidc/oidc-roles.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
data "aws_iam_policy_document" "github_oidc_role" {
for_each = local.oidc_roles
dynamic "statement" {
for_each = length(each.value.targets) > 0 ? [1] : [0]
for_each = length(each.value.targets) > 0 ? [1] : []

content {
sid = "AllowOIDCToAssumeRoles"
Expand Down

0 comments on commit 683c829

Please sign in to comment.