From e867daa420323d3c9c712529044f76f3d84d627c Mon Sep 17 00:00:00 2001 From: Aidan Mundy Date: Thu, 19 Aug 2021 20:21:00 -0400 Subject: [PATCH] Allow instance `Name` tag to be overwritten Allow instance `Name` tag to be overwritten by the user-defined node-group variable `additional_tags`. --- modules/node_groups/launch_template.tf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/node_groups/launch_template.tf b/modules/node_groups/launch_template.tf index bdd05b3a2c..e420efece1 100644 --- a/modules/node_groups/launch_template.tf +++ b/modules/node_groups/launch_template.tf @@ -77,11 +77,11 @@ resource "aws_launch_template" "workers" { 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] - } + }, + lookup(var.node_groups_defaults, "additional_tags", {}), + lookup(var.node_groups[each.key], "additional_tags", {}) ) } @@ -91,11 +91,11 @@ resource "aws_launch_template" "workers" { 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] - } + }, + lookup(var.node_groups_defaults, "additional_tags", {}), + lookup(var.node_groups[each.key], "additional_tags", {}) ) }