From ae92ee636cd97f1010b9b487bc24584f107ced6d Mon Sep 17 00:00:00 2001 From: amanverma678 Date: Fri, 6 Dec 2024 02:01:21 +0530 Subject: [PATCH] fix: variables --- node_group/aws_managed/main.tf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/node_group/aws_managed/main.tf b/node_group/aws_managed/main.tf index b07015c..888f5ee 100644 --- a/node_group/aws_managed/main.tf +++ b/node_group/aws_managed/main.tf @@ -52,11 +52,13 @@ resource "aws_launch_template" "this" { for_each = var.instance_market_options != null ? [var.instance_market_options] : [] content {} - dynamic "spot_options" { - for_each = instance_market_options.value.spot_options != null ? [instance_market_options.value.spot_options] : [] - content {} + dynamic "spot_options" { + for_each = instance_market_options.value.spot_options != null ? [instance_market_options.value.spot_options] : [] + content { + max_price = spot_options.value.max_price + } } - } + } dynamic "block_device_mappings" { for_each = var.block_device_mappings