Skip to content

Commit

Permalink
fix: Don't add tags on network interfaces because it's not supported …
Browse files Browse the repository at this point in the history
…yet in `terraform-provider-aws` (#1407)
  • Loading branch information
barryib authored May 28, 2021
1 parent 3529cae commit 65f5e2e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
14 changes: 0 additions & 14 deletions modules/node_groups/launch_template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
18 changes: 0 additions & 18 deletions workers_launch_template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 65f5e2e

Please sign in to comment.