AI-Driven Terraform: Move Fast Without Losing Control
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
In a post on his site newbmiao, the author lays out a workflow for letting AI write Terraform without giving it production access. AI commits small changes on a controlled branch inside a pre-defined file and resource scope. Scripts run fmt, validate, TFLint and Checkov, and tfpolicy enforces infrastructure rules. A plan-JSON check flags deletes, replaces and out-of-scope changes. A person approves the exact plan, and a separate CI/CD identity applies it. The guidance is the author's own practice, with no measured results.