Fix IAM instance profile toggle for mixed launch templates (#381)

This commit is contained in:
jnozo
2019-05-15 08:29:25 -07:00
committed by Max Williams
parent 763a3d5baa
commit a9753e8303
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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}"