Skip to main content

Ability to Enforce Certain Labels Exist on Spacelift Resources

We’d like the ability to enforce certain labels exist on all Stacks, Contexts, etc. This especially helps when it comes to auto-attaching things like Policies.

Workaround
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 post stays visible, and if it gathers more votes or comments we can reopen it. If it still matters to you, add a vote or a comment so we can gauge the demand.

  • Black Breeze

    •

    May 10, 2025

    Thanks for the feedback—this is an interesting area. Could you share a bit more about what you’re hoping to achieve? For example, is this about preventing certain resources from being created without required labels, or is it more about being able to detect and report on that after the fact?

    Was there a recent situation that made this painful? And if you could describe the ideal experience, what would enforcing these constraints look like in practice?

    We want to make sure we understand the job you’re trying to get done here.

    • Bronze Coast

      •

      May 10, 2025

      Our main use case is that we autoattach all Policies based on Stack labels I.e env=dev, env=prod, but we don’t have a great way to enforce that all Stacks are created with one of these labels.

      We can write Plan policies that enforce these labels exist at Plan time, but it would be great if we could enforce their existence at Stack creation time.