Skip to content

Commit c173ba2

Browse files
authored
fix: Add compact() to aws_auth_configmap_yaml for when node groups are set to create = false (terraform-aws-modules#2029)
1 parent 681e00a commit c173ba2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

outputs.tf

+4-4
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ output "aws_auth_configmap_yaml" {
185185
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"
186186
value = templatefile("${path.module}/templates/aws_auth_cm.tpl",
187187
{
188-
eks_managed_role_arns = [for group in module.eks_managed_node_group : group.iam_role_arn]
189-
self_managed_role_arns = [for group in module.self_managed_node_group : group.iam_role_arn if group.platform != "windows"]
190-
win32_self_managed_role_arns = [for group in module.self_managed_node_group : group.iam_role_arn if group.platform == "windows"]
191-
fargate_profile_pod_execution_role_arns = [for group in module.fargate_profile : group.fargate_profile_pod_execution_role_arn]
188+
eks_managed_role_arns = compact([for group in module.eks_managed_node_group : group.iam_role_arn])
189+
self_managed_role_arns = compact([for group in module.self_managed_node_group : group.iam_role_arn if group.platform != "windows"])
190+
win32_self_managed_role_arns = compact([for group in module.self_managed_node_group : group.iam_role_arn if group.platform == "windows"])
191+
fargate_profile_pod_execution_role_arns = compact([for group in module.fargate_profile : group.fargate_profile_pod_execution_role_arn])
192192
}
193193
)
194194
}

0 commit comments

Comments
 (0)