Do not trigger runs when dependency changes
In the Stack dependencies setup, there is the option to always trigger when a dependent stack runs, or only when the specific dependency changes, but not to not trigger a run in any case.
As stack dependencies are the recommended way of using outputs from other stacks, it would be great to have another mode when an output dependency changes foes not trigger any run.
This shoudl, be doable via the Terraform resource spacelift_stack_dependency_reference
e.g.
stackA depends on outputX of stackB.
stackA does not need to immediately do a run when outputX changes
stackA ← outputB dependency should be able to be configure as “Never Trigger", in the same manner ti an be confgiure with "Always trigger"
- Workaround
- No
- Problem
Log in to comment and vote
Comments4
Gold Pear
Sep 14
We have a standby stack: the green half of a blue/green pair. It has to stay wired into the dependency graph, because it needs those edges the moment we bring it up, but it should never start a run on its own. Every apply of its parent leaves a pending run that someone has to discard.
The case we would add is a dependency that carries no output reference. Ours exists purely for ordering: a cluster must not build before its database, even though it consumes nothing from it. Edges that do carry a reference already behave well, since Spacelift skips the run when the output is unchanged. The reference-free ones always trigger.
One more thing that matters to us: whatever the setting is, it needs to change hands. When we swap colors the dormant stack becomes live and the live one becomes dormant, so we set it on one and clear it on the other as a routine operation.
Natalia Gazda
Aug 7, 2025
Thanks for reaching out! Good news - what you're looking for is already possible with Spacelift's current stack dependencies feature.
You can achieve a "never trigger" behavior by creating a stack dependency without any output references. Here's how:
1. In stackA's Dependencies tab, add stackB as a dependency
2. Don't add any output references (skip the "Add reference" step)
3. Make sure "Trigger always" is not enabled
With this setup:
- stackA will not automatically trigger when stackB runs
- The dependency still ensures proper ordering when both stacks are triggered by other means (manual triggers, VCS pushes, scheduled runs)
- You get the dependency relationship without the automatic triggering
This is actually how many teams handle infrastructure that needs ordering but not immediate propagation - exactly your use case with network/security stacks that other stacks depend on but don't need immediate updates from.For your specific scenario with hundreds of dependent stacks, this approach would prevent the worker pool overwhelm while maintaining the dependency relationships for when you do need coordinated updates.
If you would you like help setting this up, please reach out to our Support Team, they will be happy to provide guidance :)
Lime Fork
Aug 11, 2025
Hi @Natalia Gazda but would this still pass the dependency as input to StackB? The key here is that we don't want the trigger, but we do want to get a specific output of StackA to be used in StackB
Natalia Gazda
Aug 12, 2025
Ah alright I get it now! Then let me check with the Team :)