Skip to content

Commit 26f5427

Browse files
committed
fix(asg): cannot make use of each in dynamic blocks
1 parent 0ca4c76 commit 26f5427

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

modules/asg/main.tf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,22 @@ resource "aws_autoscaling_group" "this" {
1919

2020
dynamic "tag" {
2121
for_each = var.instances_tags
22+
iterator = tag
2223

2324
content {
24-
key = each.key
25-
value = each.value
25+
key = tag.key
26+
value = tag.value
2627
propagate_at_launch = true
2728
}
2829
}
2930

3031
dynamic "tag" {
3132
for_each = var.tags
33+
iterator = tag
3234

3335
content {
34-
key = each.key
35-
value = each.value
36+
key = tag.key
37+
value = tag.value
3638
propagate_at_launch = false
3739
}
3840
}

0 commit comments

Comments
 (0)