Fix: ENI's prevent SecGrps from being destroyed on tf destroy (#311)

* Fix: remove ENI's on term fixes cluster destroy issues with security group still attached

* Fix: delete ENIs on term to allow sg destroy
This commit is contained in:
Jeffrey Rose
2019-04-11 07:29:35 -06:00
committed by Max Williams
parent 18e00861e4
commit 47c7e7ad6f
3 changed files with 4 additions and 0 deletions

View File

@@ -64,6 +64,7 @@ resource "aws_launch_template" "workers_launch_template" {
network_interfaces {
associate_public_ip_address = "${lookup(var.worker_groups_launch_template[count.index], "public_ip", local.workers_group_launch_template_defaults["public_ip"])}"
delete_on_termination = "${lookup(var.worker_groups_launch_template[count.index], "eni_delete", local.workers_group_launch_template_defaults["eni_delete"])}"
security_groups = ["${local.worker_security_group_id}", "${var.worker_additional_security_group_ids}", "${compact(split(",",lookup(var.worker_groups_launch_template[count.index],"additional_security_group_ids", local.workers_group_launch_template_defaults["additional_security_group_ids"])))}"]
}