diff --git a/main.tf b/main.tf index 749e67d..93ab750 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 }