terramate
terramate copied to clipboard
[FEATURE] Support `condition` in `import` blocks
Describe the solution you'd like
Would like to see conditional imports. Example:
import {
condition = global.environment == "staging"
source = "/environments/staging/config.tm.hcl"
}
This could be leveraged to pull in specific globals based on some metadata etc.
Hi @ottramst,
Thanks for reaching out with new ideas :rocket:
This feature is already on our backlog. We are working on other features at the moment, like vendoring support and improved ternary support, but as soon as we have conditional importing we will let you know :smiley:
Hi @ottramst,
a first refactoring to make this available soon is now in review.
we still do not have n ETA on the final feature though. please stay tuned ;)