Skill 8.2.2
Implement cost checks and gates in CI/CD pipelines
Key Concepts
A cost check in a continuous integration and continuous delivery (CI/CD) pipeline runs on every infrastructure change. It can inform (comment the estimate), warn (flag changes above a threshold for review) or block (fail the pipeline when a policy is violated). Policies can be cost thresholds, such as an increase above USD 1,000 a month, or rules, such as missing owner tags or a disallowed instance family.
Good gates have clear, published thresholds, fast feedback, a documented approval or exception path for justified increases, and a low false-positive rate. Gates that block legitimate work without an escape route teach teams to work around them.
Policy checks can be implemented with Open Policy Agent or similar tools against the plan file, or with the policy features of the IaC platform. Results should be logged so that the FinOps team can see which policies trigger most often and whether thresholds need adjusting.