Skip to content

Commit

Permalink
fix: variables
Browse files Browse the repository at this point in the history
  • Loading branch information
amanverma678 committed Dec 5, 2024
1 parent ae92ee6 commit 2ea03f5
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions node_group/aws_managed/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,20 @@ resource "aws_launch_template" "this" {

# Dynamic block for instance_market_options
dynamic "instance_market_options" {
for_each = var.instance_market_options != null ? [var.instance_market_options] : []
content {}
for_each = var.instance_market_options != null ? [var.instance_market_options] : []
content {
market_type = instance_market_options.value.market_type
}

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 for spot_options within instance_market_options
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
content {
Expand Down

0 comments on commit 2ea03f5

Please sign in to comment.