Skip to content

Commit

Permalink
fix: iam_instance_profile_name empty when manage_worker_iam_resources…
Browse files Browse the repository at this point in the history
…=false

Co-authored-by: Ohad David <[email protected]>
  • Loading branch information
odavid and ohaddavid-pecan authored May 5, 2020
1 parent c1ae5c1 commit 5000dda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/worker_groups/worker_groups.tf
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ resource "aws_launch_template" "worker_groups" {

iam_instance_profile {
name = coalescelist(
var.manage_worker_iam_resources ? list(aws_iam_instance_profile.worker_groups[each.key].name) : list(""),
var.manage_worker_iam_resources ? list("") : list(data.aws_iam_instance_profile.custom_worker_group_launch_template_iam_instance_profile[each.key].name)
var.manage_worker_iam_resources ? [aws_iam_instance_profile.worker_groups[each.key].name] : [],
var.manage_worker_iam_resources ? [] : [data.aws_iam_instance_profile.custom_worker_group_launch_template_iam_instance_profile[each.key].name],
[""]
)[0]
}

Expand Down

0 comments on commit 5000dda

Please sign in to comment.