terramate
terramate copied to clipboard
[FEATURE] Support tags in `terramate generate`
Describe the bug
If you run terramate generate --help it shows you that the --tags option is available. However, if you make use of this, Terramate will still generate the code for all stacks.
To Reproduce
In a Terramate configuration with multiple tagged stacks, run terramate generate --tags="< valid tags here>".
Expected behavior I would have expected Terramate to only generate code for the stacks which match the tag filter.
Log Output Add logs from Terramate to help debug your problem.
Environment (please complete the following information):
- OS: Linux
- OS Version: Arch Linux
- Git Version: 2.39.2
- Terramate Version: 0.2.16
Hi @JanMa,
The addition of scope = root file generation made it a (temporary) requirement to generate the full repository at all times.
Before its was supporting generating sub-trees. It never supported any filters as e.g. changed will only be known after generation.
I will convert your request into a feature request as it would be a great addition but is not a bug due to the fact that it was never intended to work like this ;)
Sadly the CLI library we are using does not allow us to change the --tags option to just work in commands where it is supported without breaking the behavior. We will switch to a better CLI package asap to provide a clear interface in a non-breaking way.
It would be ideal if -C or --chdir is supported as well, we are hoping to support either mechanism of scoping stacks (--tags or--chdir) in our CLI which wraps terramate generate|plan|apply