config.all.exclude_stacks as described in https://terraspace.cloud/docs/dependencies/exclude-stacks/#example-2-simple-exclude
does not work as it is written there.
Let’s say we have 2 stacks
app/stacks/stack1
app/stacks/stack2
stack1 has outputs that should be used in stack2.
If we have set
Terraspace.configure do |config|
config.all.exclude_stacks = ["stack2"]
end
and you run
terraspace up stack1
(to generate the output)
followed by
terraspace up stack2
you will get an error message like this:
│ Error: Invalid value for input variable
│
│ on 1-base.auto.tfvars line 3:
│ 3: = “(Output could not be looked up for the stack2 tfvars file. stack1 stack needs to be deployed)”
│
│ The given value is not suitable for var.
│ declared at variables.tf:8,1-41: map of string required.
(in my case , one of the variables I wanted to output from stack1 was a map of strings)
According to https://terraspace.cloud/docs/dependencies/exclude-stacks/#example-2-simple-exclude
you should still be able to deploy stack2 with terraspace up stack2