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:
Terraspace.configure do |config|
# These are the defaults
all.exit_on_fail.down = true
all.exit_on_fail.up = true
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
│ ├── b1
│ │ └── c1
│ └── b2
│ ├── c1
│ └── c2
│ └── d1
│ └── e1
Targeting only parts of the graph:
$ terraspace all graph a2 b2 --format text
│ ├── c1
│ └── b3
│ └── c3