Description
Problem:
If you have a stacker configuration defining several stacks which pass variables between them at the configuration level, you cannot specify a stack in the middle using the --stacks
option. Instead, you must explicitly specify all of the upstream stacks using separate --stacks
arguments.
Desired Outcome:
I should be able to specify a single stack, and stacker should be able to build the dependency tree and submit everything upstream for building.
Example:
- I have 5 stacks, A, B, C, D, and E
- All stacks depend upon A
- Stack D depends upon B and C
- Stack E depends upon E
In order to build this currently, I have to specify:
stacker build <path/to/file.env> <path/to/file.yml> --stacks A --stacks B --stacks C --stacks D
A preferred invocation would be:
stacker build <path/to/file.env> <path/to/file.yml> --stacks D
These two things should be functionally equivalent.
Addendum:
I could see a reasonable argument that this could lead to confusing scenarios when folks are using direct cross-stack references inside of their troposphere code. These would then fail to be satisfied at runtime. One way to solve for this would be to introduce an additional flag to the effect of --detect-stack-dependencies
which requires the user to knowingly automagically handle dependencies.