Skip to main content

Add dependency stack metadata to stack policy inputs

We would like the option of creating plan policies to warn when stacks that depend on each other from the same repo are not running at the same commit or branch. For example if stack B depends on stack A we’d like to see in the input json data some basic metedata from the stack A run that triggered stack B. This should include the repo, branch and commit but ideally includes the json “stack” data.

Workaround
Problem
Status: ⬆️ Gathering votes1 comment

Log in to comment and vote

Comments1

  • Natalia Gazda

    Team•

    Aug 6, 2025

    Thanks for sharing this feature request!

    I can definitely see how having visibility into the triggering stack's metadata would help ensure consistency across dependent stacks from the same repository. You're right that the current approach using Terraform variables as a workaround adds unnecessary complexity.

    While our stack dependencies feature handles execution ordering well, the plan policy inputs don't currently include metadata about the triggering stack - this information is only available to approval policies via the triggered_by field.I'm curious to better understand your specific use case:
    - How frequently do you encounter situations where dependent stacks are running at different commits?
    - Is this primarily a concern during active development or also in production environments?
    - Would having just the commit hash be sufficient, or do you need the full stack metadata?

    In the meantime, have you considered using approval policies for this validation? While I understand that's later in the workflow than ideal, they do receive triggering stack information. Another option might be to use stack labels to encode version information that policies can check, though I acknowledge that's still more manual than what you're looking for.