INF-56Optional
Show the cost of each change in review
Show the monthly cost change of every infrastructure pull request in the review. Ask the budget owner to approve any change above a set amount.
How to do it
Use a tool such as Infracost, which reads the plan and prices it. Post the difference as a comment on the pull request. Set the approval limit as a share of the monthly budget, such as 10 percent. After the merge, Watch what the service costs tracks the bill.
Examples
Shell example
infracost breakdown --path infra/production --format json --out-file base.json # on the main branch
infracost diff --path infra/production --compare-to base.json # on the pull request
How to check
A pull request that adds a large database shows its monthly price in a comment. It cannot merge without the budget owner's approval.
Related rules
- INF-53 Give every account a budget with alerts in Infrastructure and environments
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/infrastructure/cost-and-ownership/cost-in-review">Agent Wranglers infrastructure and environments playbook</a>. In code you write, add a comment next to it with the same link.