From 65f5e2e4974fefaf0458212b5b0b086b11b4ff74 Mon Sep 17 00:00:00 2001 From: "Thierno IB. BARRY" Date: Fri, 28 May 2021 16:49:15 +0200 Subject: [PATCH] fix: Don't add tags on network interfaces because it's not supported yet in `terraform-provider-aws` (#1407) --- modules/node_groups/launch_template.tf | 14 -------------- workers_launch_template.tf | 18 ------------------ 2 files changed, 32 deletions(-) diff --git a/modules/node_groups/launch_template.tf b/modules/node_groups/launch_template.tf index 6ad2b68f85..bdd05b3a2c 100644 --- a/modules/node_groups/launch_template.tf +++ b/modules/node_groups/launch_template.tf @@ -99,20 +99,6 @@ resource "aws_launch_template" "workers" { ) } - # Supplying custom tags to EKS instances ENI's - tag_specifications { - resource_type = "network-interface" - - tags = merge( - var.tags, - lookup(var.node_groups_defaults, "additional_tags", {}), - lookup(var.node_groups[each.key], "additional_tags", {}), - { - Name = local.node_groups_names[each.key] - } - ) - } - # Tag the LT itself tags = merge( var.tags, diff --git a/workers_launch_template.tf b/workers_launch_template.tf index 76225658ed..f7912ffe1b 100644 --- a/workers_launch_template.tf +++ b/workers_launch_template.tf @@ -563,24 +563,6 @@ resource "aws_launch_template" "workers_launch_template" { ) } - tag_specifications { - resource_type = "network-interface" - - tags = merge( - { - "Name" = "${coalescelist(aws_eks_cluster.this[*].name, [""])[0]}-${lookup( - var.worker_groups_launch_template[count.index], - "name", - count.index, - )}-eks_asg" - }, - { 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) - } - ) - } - tags = var.tags lifecycle {