Skip to content

Commit

Permalink
Replace each by each.value in instance_market_options
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf committed Nov 15, 2024
1 parent 954bbae commit b05d0fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aws/infrastructure.tf
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ resource "aws_instance" "instances" {
}

dynamic "instance_market_options" {
for_each = contains(values.tags, "spot") ? [each] : []
for_each = contains(values.tags, "spot") ? [each.value] : []
iterator = spot
content {
spot_options {
spot_instance_type = lookup(spot.value, "spot_instance_type", "persistent")
instance_interruption_behavior = lookup(spot.value, "instance_interruption_behavior", "stop")
max_price = lookup(spot.value, "max_price", null)
spot_instance_type = lookup(spot, "spot_instance_type", "persistent")
instance_interruption_behavior = lookup(spot, "instance_interruption_behavior", "stop")
max_price = lookup(spot, "max_price", null)
}
}
}
Expand Down

0 comments on commit b05d0fb

Please sign in to comment.