-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
run_cmd is always executed - ternary operator is not correctly supported #1448
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingcontributions-requestedRequesting contributions from the communityRequesting contributions from the communityenhancementNew feature or requestNew feature or request
Description
I need to run a conditional run_cmd based on the below:
locals {
condition = true
value = local.condition ? run_cmd("echo", "A") : run_cmd("echo", "B")
}Running terragrunt plan/apply will execute always both commands:
[terragrunt] 2020/11/29 14:45:23 Running command: echo A
A
[terragrunt] 2020/11/29 14:45:23 run_cmd output: [A
]
[terragrunt] 2020/11/29 14:45:23 Running command: echo B
B
[terragrunt] 2020/11/29 14:45:23 run_cmd output: [B
]
The expected behavior is to run only run_cmd("echo", "A")
I'm using terragrunt version v0.26.7
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcontributions-requestedRequesting contributions from the communityRequesting contributions from the communityenhancementNew feature or requestNew feature or request