Skip to main content

Stack Dependencies V2

We're thrilled to announce that the second iteration of stack dependencies is now GA. In this release, we're introducing some exciting enhancements:

Stack References

Historically, downstream dependencies were always triggered regardless of changes in the upstream stack. This posed a challenge for a few users, as they wanted to trigger stacks only when there were changes in the upstream stack. In the new version we introduced stack dependency references. References are a way to pass values between stacks, but also a way to detect changes.


Image #1

When a reference is set between two stacks, the downstream stack will only be triggered if at least one of the referenced outputs have changed. This means that if you have a stack that creates a VPC and another stack that creates an EC2 instance, you can reference the VPC ID in the EC2 stack and the EC2 stack will only be triggered if the VPC ID changes. This is a great way to avoid unnecessary runs. If there are multiple references set between two stacks, the downstream stack will only be triggered if any of the referenced outputs have changed.

Sensitive outputs and worker pools

A stack output can be sensitive or non-sensitive. For example, in Terraform you can mark an output sensitive = true. Sensitive outputs are masked in the Spacelift UI and are encrypted on the storage layer.

Spacelift will upload sensitive outputs to the server - this is enabled by default on the public worker pool.

On private worker pools however, it needs to be enabled explicitly by adding the SPACELIFT_SENSITIVE_OUTPUT_UPLOAD_ENABLED=true environment variable to the worker. This is a requirement if you wish to utilize sensitive outputs for stack dependencies.

Learn more in the docs and take it for a spin!

New