Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing data_source for spacelift_stack_destructor #544

Open
Radkowski opened this issue May 3, 2024 · 3 comments
Open

missing data_source for spacelift_stack_destructor #544

Radkowski opened this issue May 3, 2024 · 3 comments

Comments

@Radkowski
Copy link

It is possible to create destructor using resource "spacelift_stack_destructor" "example" { ... }

...but it is not possible to read already created destructor details via data_source.

It could be ideally to have a data source in spacelift provider that allows to get destructorID based on stackID, for example:

data "spacelift_stack_destructor" "example" {
stack_id = "1234567890qwertyuiop"
}

…that returns all destructor-related data, including destructor_id

@jmfontaine
Copy link
Contributor

Hi @Radkowski,

spacelift_stack_destructor is special because it is not a resource per se but rather a marker that triggers the destruction of a stack's resources. I am not sure how exposing it via a data source makes sense.

What would be the use case for it?

@Radkowski
Copy link
Author

Hi @jmfontaine ,

In the nutshell is to dynamically build dependencies based on your example provided here: https://docs.spacelift.io/concepts/stack/stack-dependencies#ordered-stack-creation-and-deletion

I have also described all details here: https://portal.feedback.us.pendo.io/app/#/case/391255

Let me know if you need more explanation

Thank you

@jubranNassar
Copy link
Contributor

Hey @Radkowski - thanks for the context. Would this be used in the depends_on attribute? for example: depends_on = data.spacelift_stack_destructor.example ? if not, I'd be curious to how you'd leverage this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants