Reconciled a 20‑record DNS zone as code
Reconciled a 20‑record DNS zone declaratively against the Cloudflare
API with separate audit and BIND‑export entry points, and turned the
CDN proxy back off on privacy grounds after building it.
August 2026

Situation. The company's DNS carried about twenty records across a
web presence, a git subdomain, two personal redirects, mail routing
through a hosted mailbox provider, a transactional sending domain
and the authentication records for both. All of it lived in a
provider's web console, which means the current state was whatever
the last person to click had left behind.

Task. The zone had to become a declaration in the repository, with a
way to compare that declaration against what the provider is
actually serving.

Action. The zone is written as data — live records, application
records, transport‑policy records and a separate list of records
pending removal, which is the honest way to record a deletion that
has not happened yet. One play reconciles it against the provider's
API. Two more entry points sit behind explicit opt‑in tags: an audit
that reports the difference without changing anything, and an export
that writes the zone out in the standard zone‑file format so it can
be read by something that is not this repository. The most
interesting decision was a reversal. Proxying the two web faces
through the provider's content network was built, worked, and was
then turned back off — because it costs the one sentence the
company's privacy page is about. With a proxy in front, another
company handles every visitor's address and every URL they request,
before we do, under their policy rather than ours. For a business
whose distinguishing claim is that nobody is watching, that is a
worse trade than the attacks it defends against.

Result. The zone is versioned, comparable and exportable, and the
one decision that went against the obvious default is written down
with its reasoning so that nobody re‑litigates it by accident. The
audit path is the part that gets used most, because knowing the
difference is more often what is wanted than closing it.

Categories:
1APIs & Integration	/categories/api/	platform.engineer.company	70
1Infrastructure	/categories/infrastructure/	platform.engineer.company	70
1Automation & CI/CD	/categories/automation/	platform.engineer.company	70
1Networking & VPN	/categories/networking/	platform.engineer.company	70
1Security	/categories/security/	platform.engineer.company	70
1Python	/categories/python/	platform.engineer.company	70

Services:
1Infrastructure as Code	/services/infrastructure-as-code/	platform.engineer.company	70
1System Administration	/services/system-administration/	platform.engineer.company	70
1Networking & VPN Setup	/services/networking-vpn/	platform.engineer.company	70
1Security & Access Management	/services/security-access/	platform.engineer.company	70

hThis page on the web	URL:https://platform.engineer.company/portfolio/reconciled-a-20-record-dns-zone-as-code/	platform.engineer.company	70
