Can I use stack dependencies with spacectl local-preview?
Last updated: November 24, 2026
No. spacectl stack local-preview creates a proposed run, and stack dependencies only consider tracked runs.
Providing values from another stack (Terraform and OpenTofu)
If your configuration needs values from another stack during a local preview, set them in a *.auto.tfvars file in the stack's project root. Terraform and OpenTofu load this file automatically.
Local preview skips files listed in .gitignore. If your .gitignore excludes .tfvars files, run:
spacectl stack local-preview --id <stack-id> --disregard-gitignore true