From 0d484b2d297c90c02d06b9b7fa6c70d696b27f3c Mon Sep 17 00:00:00 2001 From: pchatain Date: Wed, 11 Sep 2024 08:38:09 -0700 Subject: [PATCH] required for capacity block --- main.tf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.tf b/main.tf index 749e67d4..93ab750a 100644 --- a/main.tf +++ b/main.tf @@ -166,6 +166,15 @@ resource "aws_instance" "this" { } } + dynamic "instance_market_options" { + for_each = length(var.instance_market_options) > 0 ? [var.instance_market_options] : [] + + content { + market_type = try(instance_market_options.value.market_type, null) + spot_options = try(instance_market_options.value.spot_options, null) + } +} + enclave_options { enabled = var.enclave_options_enabled }