Dev.to
7/3/2026

The Right Way to Pair AI With Terraform Plans
Short summary
Pasting raw Terraform plans into Claude produces noisy, hard-to-scan reviews. Instead, use terraform show -json with jq to extract only dangerous changes (deletes/replaces), then send a compact JSON summary with a structured prompt. This pattern can be automated in CI/CD to catch deployment risks before apply.
- •Raw terraform plan output is too verbose for effective AI review
- •Filter with jq to extract only dangerous changes (deletes, replaces) and send structured JSON to Claude
- •Use a specific three-part prompt for data-risk assessment, and automate the workflow in CI/CD
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



