Skip to content

Commit 3495c0d

Browse files
authored
fix: Remove empty "" from node group names output when node group creation is disabled (#2197)
1 parent 436c55c commit 3495c0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

outputs.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ output "eks_managed_node_groups" {
179179

180180
output "eks_managed_node_groups_autoscaling_group_names" {
181181
description = "List of the autoscaling group names created by EKS managed node groups"
182-
value = flatten([for group in module.eks_managed_node_group : group.node_group_autoscaling_group_names])
182+
value = compact(flatten([for group in module.eks_managed_node_group : group.node_group_autoscaling_group_names]))
183183
}
184184

185185
################################################################################
@@ -193,7 +193,7 @@ output "self_managed_node_groups" {
193193

194194
output "self_managed_node_groups_autoscaling_group_names" {
195195
description = "List of the autoscaling group names created by self-managed node groups"
196-
value = [for group in module.self_managed_node_group : group.autoscaling_group_name]
196+
value = compact([for group in module.self_managed_node_group : group.autoscaling_group_name])
197197
}
198198

199199
################################################################################

0 commit comments

Comments
 (0)