From c8195c53481e858b854e745258e9db14ae52f54d Mon Sep 17 00:00:00 2001 From: Ilya Nemakov Date: Mon, 30 Mar 2020 19:27:56 +0300 Subject: [PATCH] feat: Add instance tag specifications to Launch Template (#822) --- workers_launch_template.tf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/workers_launch_template.tf b/workers_launch_template.tf index 4eea118..947bd19 100644 --- a/workers_launch_template.tf +++ b/workers_launch_template.tf @@ -403,6 +403,21 @@ resource "aws_launch_template" "workers_launch_template" { ) } + tag_specifications { + resource_type = "instance" + + tags = merge( + { + "Name" = "${aws_eks_cluster.this[0].name}-${lookup( + var.worker_groups_launch_template[count.index], + "name", + count.index, + )}-eks_asg" + }, + var.tags, + ) + } + tags = var.tags lifecycle {