diff --git a/main.tf b/main.tf index 749e67d..a0536b3 100644 --- a/main.tf +++ b/main.tf @@ -166,6 +166,14 @@ 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) + } + } + enclave_options { enabled = var.enclave_options_enabled } diff --git a/variables.tf b/variables.tf index 38a1b5b..c7e600b 100644 --- a/variables.tf +++ b/variables.tf @@ -40,6 +40,12 @@ variable "maintenance_options" { default = {} } +variable "instance_market_options" { + description = "The market (purchasing) option for the instance" + type = any + default = {} +} + variable "availability_zone" { description = "AZ to start the instance in" type = string