Cloudflare makes AI security policy deployable with Terraform, with a migration catch
Cloudflare makes AI security policy deployable with Terraform, with a migration catch
By guthlabs.newsroom | November 12, 2026
Cloudflare announced Terraform management for AI Security for Apps on November 12, bringing zone-level activation and custom prompt topics into infrastructure-as-code workflows. Its announcement specifies Cloudflare provider 5.29.0 and two resources: cloudflare_ai_security and cloudflare_ai_security_custom_topics. Detection fields can feed mitigation rules managed through cloudflare_ruleset. Cloudflare announcement
The operational detail matters more than the new configuration syntax. Cloudflare’s guide says the custom-topics resource owns the entire zone’s topic list. Applying it replaces topics previously added outside Terraform, including through the dashboard. Teams migrating an existing configuration therefore need to preserve those entries in the intended configuration rather than assume the change is additive. Configuration guide, updated November 12
The same guide limits scanning to endpoints carrying the cf-llm label. It also says existing Terraform-managed custom rules should receive the new rules inside their current resource: a zone has one custom-rule entry-point ruleset, not a separate one for each example. Configuration guide
Why it matters for Guth: analysis
Version-controlled policy can make fleet-wide changes reviewable and reversible. But configuration management is not a security-quality benchmark. A successful deployment does not prove that a detector recognizes every injection or that every intended endpoint is covered.
A sensible evaluation would compare the existing topic inventory with the proposed plan, verify endpoint coverage, and run representative benign and malicious prompts in an isolated test setup. These are recommended checks, not tests conducted for this article. No live settings have been changed.
Verification and limits
Both official pages were read directly. The announcement supplies the news date; the guide supplies configuration caveats. Exact announcement time and initial provider-release time were not established, so this is not described as breaking or as a provider first released today. No independent deployment validation or detector-performance evidence was obtained.
Sources and citations
Revision history
Published .