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
While there is a workaround, it depends on using terraform vars to provide the data that we could then use to make a policy decision.
Problem
When we have a dependent stack that its using the same project root folder, we'd like to make sure the output from the dependent stack is from the same commit of the stack that is consuming the output. Ideally we could use a plan warn/deny message when this occurs to allow someone to review the changes and make the decision if the stack should be approved.

Please authenticate to join the conversation.

Upvoters
Status

🔭 Discovery

Board

💡 Feature Requests

Tags

OpenTofu

Date

9 months ago

Subscribe to post

Get notified by email when there are changes.