Excluding terraspace cache builds for non-related/non-dependent stacks in a project

Hello BoltOps Community,

Let’s say I have the following stacks in my project

  • stack1
  • stack2
  • stack3

When I do a terraspace up stack1, although it would eventually only deploy stack1, I noticed that it would try to also build the cache for stack2 and stack3 (and therefore would fail if let’s say there is an error in the build for stack2 or stack3).

Is there a way to only target just building the cache for stack1?

I’ve not tried, but I suspect the behaviour would also be the same if I were to use terraspace all up. E.g. If stack3 is an independent stack, and stack1 is dependent on stack2, doing a terraspace all up stack1 would try to build the cache for stack1, stack2 and stack3 (instead of just stack1 and stack2)

Many thanks,

Currently, all stacks are built. The reason for that is because it simplified the implementation. Particularly, when terraspace up runs multiple times during a terraspace all, building only each stack would cause race conditions with the file system. This is because a build can clean up and or rewrite the files. Will consider PRs for improvements, but unsure if its worth the complexity. Also, this is from memory, so the details may be a little off.

Understood, thanks Tung!