-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Do not evaluate lets
block if condition
is false in generate_file
and generate_hcl
#1636
Comments
condition
over lets
in generate_file
and generate_hcl
lets
block if condition
is false in generate_file
and generate_hcl
lets
block if condition
is false in generate_file
and generate_hcl
lets
block if condition
is false in generate_file
and generate_hcl
Hi @g13013 We are aware of this issue. About your proposed solution, what if the In our experience, usually the condition can get complex then being able to create temporary |
We are planning to improve the evaluation of variables, so we only evaluate needed parts. |
Even better, it makes a lot of sense and it would awesome to have this ! |
First, it should evaluate the condition, then if all conditions are met, it should start evaluating/generating lets variables. for example, if I am using an external terraform state file as a data source inside the lets variables:
|
Is your feature request related to a problem? Please describe.
The current behavior of the
lets
block is that it's evaluated all the time regardless of thecondition
result, this leads errors in some scenarios when lets block depends on whether the condition is true or false, the problem becomes more annoying when the lets bloc have many variables that depend on the same conditionexample
Describe the solution you'd like
The
lets
block or any other block should not be evaluated if the condition is falseThe text was updated successfully, but these errors were encountered: