Skip to content

Commit

Permalink
compact the worker security group to remove empty group id
Browse files Browse the repository at this point in the history
  • Loading branch information
sunghospark-calm committed Jun 25, 2021
1 parent 9022013 commit 0befae3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/node_groups/launch_template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ resource "aws_launch_template" "workers" {
network_interfaces {
associate_public_ip_address = lookup(each.value, "public_ip", null)
delete_on_termination = lookup(each.value, "eni_delete", null)
security_groups = flatten([
security_groups = compact(flatten([
var.worker_security_group_id,
var.worker_additional_security_group_ids,
lookup(
each.value,
"additional_security_group_ids",
null,
),
])
]))
}

# if you want to use a custom AMI
Expand Down

0 comments on commit 0befae3

Please sign in to comment.