Skip to content

Commit ffdc7a7

Browse files
authored
fix: Fixed list and map usage (#1307)
1 parent eafc458 commit ffdc7a7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

workers_launch_template.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ resource "aws_autoscaling_group" "workers_launch_template" {
164164

165165
dynamic "launch_template" {
166166
iterator = item
167-
for_each = (lookup(var.worker_groups_launch_template[count.index], "override_instance_types", null) != null) || (lookup(var.worker_groups_launch_template[count.index], "on_demand_allocation_strategy", local.workers_group_defaults["on_demand_allocation_strategy"]) != null) ? [] : list(var.worker_groups_launch_template[count.index])
167+
for_each = (lookup(var.worker_groups_launch_template[count.index], "override_instance_types", null) != null) || (lookup(var.worker_groups_launch_template[count.index], "on_demand_allocation_strategy", local.workers_group_defaults["on_demand_allocation_strategy"]) != null) ? [] : [var.worker_groups_launch_template[count.index]]
168168

169169
content {
170170
id = aws_launch_template.workers_launch_template.*.id[count.index]
@@ -209,11 +209,11 @@ resource "aws_autoscaling_group" "workers_launch_template" {
209209
],
210210
[
211211
for tag_key, tag_value in var.tags :
212-
map(
213-
"key", tag_key,
214-
"value", tag_value,
215-
"propagate_at_launch", "true"
216-
)
212+
tomap({
213+
key = tag_key
214+
value = tag_value
215+
propagate_at_launch = "true"
216+
})
217217
if tag_key != "Name" && !contains([for tag in lookup(var.worker_groups_launch_template[count.index], "tags", local.workers_group_defaults["tags"]) : tag["key"]], tag_key)
218218
],
219219
lookup(

0 commit comments

Comments
 (0)