Programmatic access to Spacelift managed state

We have thousands of stacks. The definition of the stacks is multilayered. (I.e. we have a “base”. The on top of the base, we build a “foo” and “bar” type. Then, for example, we could add an “aaa” on top of foo. And then, eventually, we create a stack on top of those other definitions.) This works fine in most cases. But, when we have to make a change to the “base” layer, we have to manually view any proposed changes. For even a dozen or so, this becomes painful. It is completely untenable to do that for hundreds, to say nothing about 1000s.

This would be much easier if we had a way to reference the state locally. Thus, we could do a local terraform plan just to figure out the scope of a proposed change.

To be clear; I am only talking about “read only” access to the state.

Ideally, we could annotate that TF somehow so that we did NOT have to make any change to run tf plan locally. And however it was set up, it would not interfere with the normal “file injection” Spacelift does.

FTR; I am aware of:

https://docs.spacelift.io/vendors/terraform/state-management#exporting-spacelift-managed-terraform-state-file

Doing that for dozens of states/stacks is EXTREMELY time consuming. And it would be a non-starter for hundreds or more.

Workaround
Manually downloading the stack via a task. https://docs.spacelift.io/vendors/terraform/state-management#exporting-spacelift-managed-terraform-state-file
Problem
We need to be able to run a command locally to know whether a proposed change to TF files that manage a stack would mean any "real changes" if those file changes were applied.

Please authenticate to join the conversation.

Upvoters
Status

👀 In Review

Board

💡 Feature Requests

Tags

Stacks

Date

About 4 hours ago

Subscribe to post

Get notified by email when there are changes.