Cloudflare · tool · fg-0216

Upgrading the Cloudflare Terraform provider to v5 breaks cloudflare_record and zone settings resources

If you see The provider cloudflare/cloudflare does not support resource type "cloudflare_record", the cause and the fix for Cloudflare are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
The provider cloudflare/cloudflare does not support resource type "cloudflare_record".Old cloudflare_zone_settings_override blocks conflict with the v5 schemaPlans propose destroying and recreating DNS records
Cause
v5 is a generated provider that renamed and restructured many resources, for example cloudflare_record became cloudflare_dns_record with content replacing value. A plain version bump leaves state and HCL on the old schema.
Fix
Run tf-migrate in dry run, then apply its HCL rewrites and moved blocks, and follow the zone_settings_override removal steps on the v4 provider before switching.
Apply
go install github.com/cloudflare/tf-migrate/cmd/tf-migrate@latest tf-migrate migrate --dry-run --source-version v4 --target-version v5 tf-migrate migrate --source-version v4 --target-version v5
Affected
terraform-provider-cloudflare v4.x to v5.x upgrades
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun