From c27b53434d8d7677fadabebb16e54faa20402798 Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Wed, 20 Apr 2022 12:14:09 -0400 Subject: [PATCH] fix: Add `compact()` to `aws_auth_configmap_yaml` for when node groups are set to `create = false` (#2029) --- outputs.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/outputs.tf b/outputs.tf index 747d30d7fe..7a06218d03 100644 --- a/outputs.tf +++ b/outputs.tf @@ -185,10 +185,10 @@ output "aws_auth_configmap_yaml" { description = "[DEPRECATED - use `var.manage_aws_auth_configmap`] Formatted yaml output for base aws-auth configmap containing roles used in cluster node groups/fargate profiles" value = templatefile("${path.module}/templates/aws_auth_cm.tpl", { - eks_managed_role_arns = [for group in module.eks_managed_node_group : group.iam_role_arn] - self_managed_role_arns = [for group in module.self_managed_node_group : group.iam_role_arn if group.platform != "windows"] - win32_self_managed_role_arns = [for group in module.self_managed_node_group : group.iam_role_arn if group.platform == "windows"] - fargate_profile_pod_execution_role_arns = [for group in module.fargate_profile : group.fargate_profile_pod_execution_role_arn] + eks_managed_role_arns = compact([for group in module.eks_managed_node_group : group.iam_role_arn]) + self_managed_role_arns = compact([for group in module.self_managed_node_group : group.iam_role_arn if group.platform != "windows"]) + win32_self_managed_role_arns = compact([for group in module.self_managed_node_group : group.iam_role_arn if group.platform == "windows"]) + fargate_profile_pod_execution_role_arns = compact([for group in module.fargate_profile : group.fargate_profile_pod_execution_role_arn]) } ) }