-
Notifications
You must be signed in to change notification settings - Fork 96
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] Configure default child/nested stack execution order per parent #1980
Comments
Hi @ltshb The parent/child nested ordering is an implicit ordering added at runtime. You can think of it as if they add hidden This implicit filesystem ordering works great in many setups but not in some advanced cases, as reported by some users, so we are planning to disable this in the next release with a configuration flag. Example: terramate {
config {
order_of_execution {
nested = false
}
}
} If disabled this way, then you will be free to use We are not sure yet if allowing to reverse the nested ordering just in some branches of the filesystem is a good idea because it can make it very hard to reason about the overall ordering of execution of the whole project, and also it can become hard to change, move or clone stacks to other places, etc. The config you proposed suggests that this would reverse the entire graph (similarly to So, talking specifically about your problem, do you think the disabling of the |
do we plan to make this configurable for specific directories and their nested structure or for entire projects only? |
@soerenmartius I think this is yet to be defined. |
@soerenmartius only globally for now, until we get more experience with the feature and hear user's feedbacks. It's easy to extend later on to subtrees only. |
Is your feature request related to a problem? Please describe.
Currently child/nested stack are always executed after the parent stack (unless the --reverse option is given). This is fine for most use case, but there is some use case where the opposite would be better. Here below an good example for this reverse order use case
In the example above you have a folder containing Content Delivery Networks like for example AWS Cloudfronts. In each Cloudfront stack you have the services that are routed by CF cache behavior. Some of the services are redirected to a k8s cluster load balancer that leaves outside of the CDN folder, but some services are a simple S3 bucket. In this case Cloudfront needs to know the bucket
domain name and is therefor depending on the service which means that cloudfront nested/child stack should be executed before and not after.
Describe the solution you'd like
It would be good to be able to change the default execution order of nested stack not only by CLI option but by parent stack or even better by a global config on a parent folder. So we could have in the CDN folder above (which is not a stack) a config file containing something like this
This config would have only effect on the current folder and its sub folders
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: