Just because AI-generated infrastructure passes tofu plan doesn’t mean it would survive an org’s compliance, cost, or scale requirements.
We had 10 models each write 9 reusable OpenTofu modules (90 total) across AWS (S3), GCP (Cloud SQL Postgres), and Azure (App Service). Almost everything planned cleanly. No syntax errors, very few failed plans. But:
S3 access log delivery was missed in 30 of 30 attempts. Every model, every time.
Cloud SQL would drop the database on removal in 24 of 28 attempts. Take the DB out of the inputs and your data goes with it.
25 of 90 attempts failed at least one mandatory security item. 6/30 S3 modules didn’t guarantee the public access block, 9/28 Cloud SQL modules didn’t require encrypted connections, and 10/28 App Service modules left basic-auth publishing on.
Only 32/90 fully validated their inputs, and 26/90 shipped docs containing false statements about what the module does.
Provider version constraints allowed the next major version in 19/30 AWS and 22/28 GCP modules.
How it was scored: 70% mechanical checks against real tofu plan output, 30% LLM judge grading against a published 14-section quality doctrine. Nothing was applied, only planned.
The obvious objection: the judge is Claude Opus 5.5, and Opus came out #1. Two things on that. First, the judge had to agree with a human grader on at least 6 of 8 modules in every section, and GPT-5.5 failed that calibration, so it wasn’t used. Second, if you rank by the mechanical score alone, the order doesn’t change. The top four (Opus 5.5, Fable 5.1, GPT-6 Astra, Sonnet 5.5) have overlapping confidence intervals, so treat them as a tie.
Some other things that stood out:
GPT-6 Luna came 6th with zero security failures, at about $0.005 per attempt.
Gemini 3.6 Flash failed security items in 8 of 9 attempts.
Kimi K3 was the best open-weight model (5th), but 4 of its 9 attempts had security failures.
Full disclosure: I work at Massdriver, which ran this. The harness is Apache-2.0 and the data is CC BY 4.0, so you can rerun it, add your own checks, or tell us where the methodology is wrong. We’d like to hear that.
Rankings: https://www.massdriver.cloud/llm-rankings
Methodology: https://www.massdriver.cloud/blogs/iac-bench-2026-10-methodology
Repo: https://github.com/massdriver-cloud/iac-bench/tree/2026-10
Raw results + generated code: https://github.com/massdriver-cloud/iac-bench/tree/2026-10/results/2026-10
Quality doctrine we graded against: https://github.com/massdriver-cloud/iac-bench/blob/2026-10/docs/good-opentofu.md
I’m curious whether these match what you’re seeing with AI-generated IaC in your orgs. What would you add to the checks?