-
Hey everyone! I started experimenting with Terramate some days ago and so far I really like the experience. In the modules directories I have several different opinionated modules referencing my base modules alongside with some data_sources to deploy into different projects and stacks. While working with that, two questions came to my mind:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hi @sfenman, Thanks for reaching out! While I will leave your first question for @mariux to answer, let me comment on your second question.
We are working on a GitHub Action that enables you to easily implement Terramate into your existing CI/CD workflows in GHA. In addition, we are working on some guides also that will elaborate on how to use Terramate correctly when working in CI/CD. We plan to ship the first guide in May together with the release of the upcoming Terramate website. I'd love to understand which CI/CD solution you are using so we can consider it for the guides right away. Feel free to join our discord community also. |
Beta Was this translation helpful? Give feedback.
-
Hi @sfenman, Thank you for your feedback.
I am not sure I fully understand the need to "cherry-pick" the versions for production. Maybe you could share some more details about the problem you have. In general, you can define Terramate globals on multiple levels in the hierarchy. The higher up the hierarchy the more stacks will inherit such a setting. In addition, you can make such a decision conditional by making it dependent on another variable and just set the value in a central place on a very high level in the hierarchy: Based on an environment: globals {
module_version = global.env == "production" ? "1.0 : "2.0-alpha"
} or based on a specific stack path: globals {
module_version = terramate.stack.path.relative == "/path/to/stack" ? "2.0-alpha" : "1.0"
} The same is possible for all combinations of regular expressions with As globals are lazily evaluated on the stack none of the variables need to exist on the higher level, but each stack reachable from the config needs to be able to evaluate all globals used or safeguard with |
Beta Was this translation helpful? Give feedback.
Hi @sfenman,
Thank you for your feedback.
I am not sure I fully understand the need to "cherry-pick" the versions for production. Maybe you c…