From 63217467a9adb2e10f6a66fa07072171b985c65c Mon Sep 17 00:00:00 2001 From: huddy Date: Thu, 12 Nov 2020 09:17:55 +0000 Subject: [PATCH] improvement: Tags passed into worker groups should also be excluded from Launch Template tag specification (#1095) --- workers_launch_template.tf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workers_launch_template.tf b/workers_launch_template.tf index 0013fe3a8d..4e96279efe 100644 --- a/workers_launch_template.tf +++ b/workers_launch_template.tf @@ -456,7 +456,10 @@ resource "aws_launch_template" "workers_launch_template" { count.index, )}-eks_asg" }, - var.tags, + { for tag_key, tag_value in var.tags : + tag_key => tag_value + if tag_key != "Name" && ! contains([for tag in lookup(var.worker_groups_launch_template[count.index], "tags", local.workers_group_defaults["tags"]) : tag["key"]], tag_key) + } ) }