From 683c829061fe7a17ee27820429ff9f1670ecb515 Mon Sep 17 00:00:00 2001 From: julialawrence Date: Tue, 9 Jul 2024 12:48:23 +0100 Subject: [PATCH] Fixing for_each looping when there's no target --- terraform/aws/analytical-platform/oidc/oidc-roles.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/aws/analytical-platform/oidc/oidc-roles.tf b/terraform/aws/analytical-platform/oidc/oidc-roles.tf index 6ba1244f03..80edd19f71 100644 --- a/terraform/aws/analytical-platform/oidc/oidc-roles.tf +++ b/terraform/aws/analytical-platform/oidc/oidc-roles.tf @@ -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"