Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 06a5598

Browse files
authored
fix: use dynamic block to ignore null market opts (#1202)
Signed-off-by: Trevor Wood <[email protected]>
1 parent 439fb1b commit 06a5598

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

modules/runners/main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,12 @@ resource "aws_launch_template" "runner" {
6363

6464
instance_initiated_shutdown_behavior = "terminate"
6565

66-
instance_market_options {
67-
market_type = var.market_options
66+
dynamic "instance_market_options" {
67+
for_each = var.market_options != null ? [var.market_options] : []
68+
69+
content {
70+
market_type = instance_market_options.value
71+
}
6872
}
6973

7074
image_id = data.aws_ami.runner.id

0 commit comments

Comments
 (0)