From aa42059363ed17e0d2a6c2ef3f484f337f23b4f9 Mon Sep 17 00:00:00 2001 From: Kevin Lefevre Date: Tue, 1 Jun 2021 14:38:40 +0200 Subject: [PATCH 1/2] fix: allow to choose LT version with create_launch_template Signed-off-by: Kevin Lefevre --- modules/node_groups/node_groups.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/node_groups/node_groups.tf b/modules/node_groups/node_groups.tf index a0ae456fa7..830c239042 100644 --- a/modules/node_groups/node_groups.tf +++ b/modules/node_groups/node_groups.tf @@ -48,7 +48,7 @@ resource "aws_eks_node_group" "workers" { dynamic "launch_template" { for_each = each.value["launch_template_id"] == null && each.value["create_launch_template"] ? [{ id = aws_launch_template.workers[each.key].id - version = aws_launch_template.workers[each.key].latest_version + version = each.value["launch_template_version"] != null ? each.value["launch_template_version"] : aws_launch_template.workers[each.key].latest_version }] : [] content { From 7205c6697f7dff3de6919b5d3c1fdd5aef294a05 Mon Sep 17 00:00:00 2001 From: Kevin Lefevre Date: Wed, 2 Jun 2021 11:16:55 +0200 Subject: [PATCH 2/2] fix: simplify default Signed-off-by: Kevin Lefevre --- modules/node_groups/node_groups.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/node_groups/node_groups.tf b/modules/node_groups/node_groups.tf index 830c239042..35eb058fb0 100644 --- a/modules/node_groups/node_groups.tf +++ b/modules/node_groups/node_groups.tf @@ -48,7 +48,7 @@ resource "aws_eks_node_group" "workers" { dynamic "launch_template" { for_each = each.value["launch_template_id"] == null && each.value["create_launch_template"] ? [{ id = aws_launch_template.workers[each.key].id - version = each.value["launch_template_version"] != null ? each.value["launch_template_version"] : aws_launch_template.workers[each.key].latest_version + version = each.value["launch_template_version"] }] : [] content {