-
Notifications
You must be signed in to change notification settings - Fork 31
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
add conditionals to module resource #268
Comments
This still makes sense a couple of days later… mostly. The string syntax for the conditionals is too different from the rest of our configuration. A better syntax could look llike: module "x.hcl" "x" {
when equal ["{{system.os}}", "darwin"]
} To generalize: a @sehqlr this syntax might be useful for your param validation work as well? |
Yes, this would be useful for parameters. I like the basic idea, but I On Sep 21, 2016 8:36 AM, "Steven Borrelli" [email protected] wrote:
|
Right, whiteboard discussion in the office over. We're going to go forward with something like a switch construct that will be expanded like a macro (that is, it will not be evaluated at runtime, but before and pruned.) select { // or `switch` or `select!` or `switch!`... You get the idea.
case {
conditional = "some syntax goes here"
value = {
module "x.hcl" "x" {}
}
}
} If the conditional syntax ends up being within a string, we can move that to the path selector of Preferred syntax among the group was something like |
PR #362 |
module resource should have conditional evaluation. Something like this:
If the whens combine (with and) to false, the subtree rooted at the module is dropped from evaluation.
The text was updated successfully, but these errors were encountered: