diff --git a/outputs.tf b/outputs.tf index 8ff30fc623..25b8a0b24a 100644 --- a/outputs.tf +++ b/outputs.tf @@ -179,7 +179,7 @@ output "eks_managed_node_groups" { output "eks_managed_node_groups_autoscaling_group_names" { description = "List of the autoscaling group names created by EKS managed node groups" - value = flatten([for group in module.eks_managed_node_group : group.node_group_autoscaling_group_names]) + value = compact(flatten([for group in module.eks_managed_node_group : group.node_group_autoscaling_group_names])) } ################################################################################ @@ -193,7 +193,7 @@ output "self_managed_node_groups" { output "self_managed_node_groups_autoscaling_group_names" { description = "List of the autoscaling group names created by self-managed node groups" - value = [for group in module.self_managed_node_group : group.autoscaling_group_name] + value = compact([for group in module.self_managed_node_group : group.autoscaling_group_name]) } ################################################################################