Skip to content

Commit 6a95d93

Browse files
committed
fix: issue with for_each on not-yet-applied resource
1 parent 4f0ae8d commit 6a95d93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/load_balancer/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ data "aws_network_interfaces" "lb_app" {
119119
}
120120

121121
data "aws_network_interface" "lb_app" {
122-
for_each = toset(data.aws_network_interfaces.lb_app.ids)
123-
id = each.value
122+
count = length(data.aws_network_interfaces.lb_app.ids)
123+
id = data.aws_network_interfaces.lb_app.ids[count.index]
124124
}
125125

126126
locals {

0 commit comments

Comments
 (0)