Skip to main content

Get Stack from Resource Value via API

With a resource value (like an AWS resource ARN), be able to query the Spacelift API and find the stack that created it.

Problem
Status: 🗑️ Archived3 comments

Log in to comment and vote

Comments3

  • Natalia Gazda

    Team•

    Jul 16

    Hey, thanks for the suggestion. We're archiving this one for now. It hasn't picked up much interest since it went up, so it isn't on our near-term roadmap. Archiving isn't deleting: the request stays on record, and if it gathers more votes or comments we can bring it back. If it still matters to you, add a vote or a comment so we can gauge the demand.

  • Aqua Reindeer

    •

    May 12, 2025

    Hey! Thanks for looking into this!

    • What’s the situation where you need to make this lookup?

      • We were writing a script to search for AWS IAM roles in our accounts that we needed to take action on, and wanted to programatically find the spacelift stacks associated with those resources.

    • How often do you do it—and what’s the outcome you want from it?

      • We frequently have cases where we want to look up the associated spacelift stack an AWS resource belongs to so we can take action on that resource. We don’t really consider or track this anymore though since we know it is not possible. The ultimate outcome we want is to be able to programatically find the stacks that have created specific resources in AWS.

    • Do you already have a system that tracks infra ownership or resource inventory? How does Spacelift fit into that puzzle?

      • Spacelift is essentially that inventory. GitHub CODEOWNERS on terraform files that create the resources is one of our primary tracking mechanisms for ownership.

    • Are there specific resource types or values you care about most?

      • AWS resources

    • Would getting this info in Spacelift be the best experience—or would forwarding this data into your existing systems be more useful?

      • Since we ultimately want to find the spacelift stack, having the ability to lookup via the spacelift API would be the most useful.

  • Black Breeze

    •

    May 10, 2025

    Thanks for the suggestion! We’d love to understand the job you’re trying to do a bit better.

    It sounds like you’re trying to trace a live resource (say, an AWS ARN) back to the Spacelift Stack that manages it. Is that right?

    A few questions to help us explore the need:

    • What’s the situation where you need to make this lookup?

    • How often do you do it—and what’s the outcome you want from it?

    • Do you already have a system that tracks infra ownership or resource inventory? How does Spacelift fit into that puzzle?

    • Are there specific resource types or values you care about most?

    • Would getting this info in Spacelift be the best experience—or would forwarding this data into your existing systems be more useful?

    We’re cautious about adding broad new search capabilities without understanding the shape of the need—especially since resource identifiers can have massive variety and indexing everything can have real cost. But if we understand your use case better, we may be able to find a simpler or more powerful way to support it.