Cloudflare's Terraform Provider now fixes bugs resource by resource!
Hey everyone, it's me, Shii-chan! Today I found a quiet but important update to Cloudflare's Terraform Provider, so let me walk you through it.
Cloudflare ChangelogWhat was announced?
On the Cloudflare Changelog, they announced Terraform Provider v5.8.2. The new v5 Provider launched earlier this year, but it seems the community reported a pretty high number of issues against it. In response, the team made a real shift in how they tackle those bugs, and that's the highlight of this release.
The story so far
Until now, the team handled things issue-to-issue — fixing bug reports one at a time as they came in. But with v5 generating so many reports, that approach made it hard for the provider to ever feel fully stable overall.
What changes
So Cloudflare kept its 2-week release cadence but switched to a resource-per-resource approach: each release now focuses on a specific resource, closing out all of the bugs tied to that resource before moving on to the next one. Instead of jumping around fixing whatever issue came in, they're building up trust one fully-stabilized resource at a time.
Dive Deep
Here are the four resources stabilized in this v5.8.2 release:
cloudflare_custom_pagescloudflare_page_rulecloudflare_dns_recordcloudflare_argo_tiered_caching
They also fixed chronic drift (where the actual state and tfstate stay out of sync, so terraform plan keeps showing a diff forever) on several other resources:
cloudflare_logpush_jobcloudflare_zero_trust_dns_locationcloudflare_rulesetcloudflare_api_token
Here's everything else I could pull from the original post:
cloudflare_zone_subscriptionnow returnsrate_plan.idcorrectly, matching older versions (it had been reading the wrong ID field)cloudflare_workers_scriptcan now be destroyed successfully even with bindings attached, and Durable Objects migrations are now properly recorded in tfstate, so upgrading between versions shouldn't get stuck anymore- You can now configure
add_headersundercloudflare_zero_trust_gateway_policy - There are other bug fixes too (the GitHub release notes list 15 closed issues for this release, including Workers script deployment failures and an Access Identity Provider bug that kept showing drift around OTP pin login)
On migration, Cloudflare says there's no rush to move to v5 while stabilization is still underway. For v4-to-v5 migration, they provide automated scripts using Grit, but these don't support setups that use Terraform modules, so module users need to migrate manually. Either way, they recommend running terraform plan to check the diff before applying.
Wrap-up
- Cloudflare's Terraform Provider has moved from issue-by-issue fixes to stabilizing one resource at a time (still on a 2-week release cadence)
- v5.8.2 stabilizes
cloudflare_custom_pages,cloudflare_page_rule,cloudflare_dns_record, andcloudflare_argo_tiered_caching - Chronic drift on four other resources is fixed, along with
cloudflare_workers_scriptdestroy failures and missing migration records - No need to rush your v5 migration — Cloudflare says it's fine to wait as stabilization continues
If you're managing Cloudflare with Terraform, it's worth keeping an eye on which resource gets stabilized next!