Skip to content

Safe Terraform auto-apply with conftest

7.2 relevance
Score Breakdown
technical depth
8
novelty
5
actionability
8
community
6
strategic
7
personal
9

Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.

Safe Terraform auto-apply with conftest, highly actionable and directly relevant.

Cloud bejarano.io
Safe Terraform auto-apply with conftest
Summary

The article presents a deterministic approach to Terraform auto-apply using conftest and Open Policy Agent to evaluate Terraform plan JSON against Rego policies. This avoids the bottleneck of manual review and the non-determinism of AI-based review, enabling safe auto-apply for changes that match predefined safe actions (e.g., only creates and reads). The CI/CD integration is straightforward: export plan to JSON, run conftest, and auto-apply if policy passes, else gate on human approval.

Author

Ricard Bejarano

More from Ricard Bejarano →