From a9753e8303cb2a0827a432cde96ddd0aee7aa931 Mon Sep 17 00:00:00 2001 From: jnozo <50669295+jnozo@users.noreply.github.com> Date: Wed, 15 May 2019 08:29:25 -0700 Subject: [PATCH] Fix IAM instance profile toggle for mixed launch templates (#381) --- CHANGELOG.md | 2 +- workers_launch_template_mixed.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96ce829..93fd995 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ project adheres to [Semantic Versioning](http://semver.org/). ### Changed -- Write your awesome change here (by @you) +- Fix toggle for IAM instance profile creation for mixed launch templates (by @jnozo) # History diff --git a/workers_launch_template_mixed.tf b/workers_launch_template_mixed.tf index 3222f61..d1f53a2 100644 --- a/workers_launch_template_mixed.tf +++ b/workers_launch_template_mixed.tf @@ -115,7 +115,7 @@ resource "aws_launch_template" "workers_launch_template_mixed" { } resource "aws_iam_instance_profile" "workers_launch_template_mixed" { - count = "${var.worker_group_launch_template_mixed_count}" + count = "${var.manage_worker_iam_resources ? var.worker_group_launch_template_mixed_count : 0}" name_prefix = "${aws_eks_cluster.this.name}" role = "${lookup(var.worker_groups_launch_template_mixed[count.index], "iam_role_id", lookup(local.workers_group_defaults, "iam_role_id"))}" path = "${var.iam_path}"