RE: Will it let the other stacks complete but have terraspace
finish with non-zero exit code or will Terraspace send a kill signal to the other terraform apply
commands running for the other stacks?
@nmorey-ratehub When a stack fails, Terraspace will stop and exit with a non-zero error code after that batch is finished. For example:
- batch 1: stack1, stack2, stack3
- batch 2: stack4, stack5
Once batch1 starts, all stack1, stack2, stack3 run in parallel. Letβs say stack2 fails, no signals are sent to stack1 and stack3, they will finish. Stacks running in parallel are considered independent. Terraspace will exit with a non-zero exit code after batch1 is done, and batch2 will not run.
This is the default behavior. Additionally, this behavior can be changed with configs:
config/app.rb
Terraspace.configure do |config|
# These are the defaults
all.exit_on_fail.down = true
all.exit_on_fail.up = true
end
See: Config Reference - Terraspace
RE: Is it possible to target only the [specific stacks]
@jalam You can target subgraphs of the dependency tree. Just specify the stacks you want to target.
Example full graph in text form.
$ terraspace all graph --format text
βββ a1
β βββ b1
β β βββ c1
β βββ b2
β βββ c1
β βββ c2
β βββ d1
β βββ e1
βββ a2
βββ c1
βββ b3
βββ c3
Targeting only parts of the graph:
$ terraspace all graph a2 b2 --format text
βββ a2
β βββ c1
β βββ b3
β βββ c3
βββ b2
βββ c1
βββ c2
βββ d1
βββ e1
See: Complex Graphs, Subgraphs, and Subtrees - Terraspace