Open cbrnit opened 1 month ago
It seems that when a recently removed domain is re-added to Cloudflare it is put back with its records intact.
Weird. I'm not sure how the provider could handle that situation since it would have no clue what state the previous zone was in or whether there even was a previous state or not.
It would require another plan cycle after (re)creating the zone to see what actually needs to happen which would violate the whole idea of planning and applying being separate steps.
Only thing I can think of that would work cleanly would be to list the zone's records immediately after creating it and then go through and delete them all before doing the apply. That would get to the right end state and conceptually follow the plan, but it's pretty ugly and could involve A LOT of churn on a large zone.
Short of that it could check to see if the zone has any records after the create and throw an error if it does saying what's up and that another plan and apply should be done.
None of the options seems great. Would be nice if CF supported a create option that created things empty.
octodns 1.10 octodns-cloudflare 0.0.7 On Windows Server 2022 with Python 3.12.4
When I try to sync a domain to Cloudflare that was previously in Cloudflare and was recently removed I get an error:
It seems that when a recently removed domain is re-added to Cloudflare it is put back with its records intact. I confirmed that by manually re-adding a domain in the Cloudflare Dash to find previously entered DNS records. When OctoDNS tries to sync a recently removed zone it errors because the recreated zone already contains records that OctoDNS is trying to add.