From b05d0fba0acf73b3cd6f59249c2a1a83fd5571e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Fortin?= Date: Fri, 15 Nov 2024 11:49:00 -0500 Subject: [PATCH] Replace each by each.value in instance_market_options --- aws/infrastructure.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aws/infrastructure.tf b/aws/infrastructure.tf index 39155f7b..d3b6bb74 100644 --- a/aws/infrastructure.tf +++ b/aws/infrastructure.tf @@ -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) } } }