Source: docs/cloudflare-terraform-migration.md
Commit:
Source updated: · Edit this page
Commit:
ca917b62635321a15d79f190225b7cff9acc1bc9Source updated: · Edit this page
Moving Cloudflare DNS record ownership from Terraform¶
Terraform and RillDNS must not manage the same Cloudflare DNS record. Complete this migration one zone at a time, with no DNS-content change during handoff.
- Run
terraform planand require a clean result. - Export the Terraform resource addresses and Cloudflare record IDs for the
selected zone using
terraform state showorterraform show -json. - Read the zone through
dns_cloudflare_list_recordsand compare every name, type, value, TTL, proxy flag, comment, and tag with Terraform. - Back up the Terraform state and configuration repository.
- Remove the selected DNS record resources from Terraform configuration.
- Remove only those addresses from state with
terraform state rm. This does not delete the remote Cloudflare records. - Run
terraform planagain and require no proposed DNS record operations. - Use
dns_cloudflare_plan_changesfor a no-op plan, then acknowledge RillDNS as the zone's sole DNS-record writer in the operational change record.
Keep the Cloudflare zone, DNSSEC, account settings, rules, and token bootstrap in Terraform. If ownership must return to Terraform, recreate configuration, import the existing record IDs, and require a clean plan before disabling the zone in RillDNS.
Never use terraform apply to resolve unexpected drift until the current owner
of the affected records has been established.