Repository navigation
Conversation
Cloudflare stores duplicate records happily: a second SPF record breaks SPF (permerror), an old MX splits incoming mail, two DMARC/MTA-STS records invalidate the policy. Before the Cloudflare step, scripts/dns-preflight.py compares every name we manage with the zone's existing records (ignoring the ones in our Terraform state) and stops with a list of conflicts (DNS_PREFLIGHT=skip overrides). just check now also flags duplicate SPF or DMARC records and any foreign MX, for every DNS host. Closes #13 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01G22o7QQ17GRtkCqpJNFr9B
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #13
Changes
scripts/dns-preflight.pyruns injust applybefore the Cloudflare step. It lists every record in the zones through the Cloudflare API, drops the ones already in our Terraform state, and stops with a list of conflicts:MX,A/AAAA,SRVorCAArecord at a name we manage;mta-sts.<domain>);v=spf1,v=DMARC1,v=STSv1,v=TLSRPTv1,v=DKIM1). Unrelated TXT records such as site verifications are fine.DNS_PREFLIGHT=skipoverrides it.just check(any DNS host, includingdns = "manual") now flags:permerror);10 <fqdn>..Testing
aspmx.l.google.comMX, the oldv=spf1 include:_spf.google.comrecord and an oldv=DMARC1; p=nonerecord.google-site-verificationTXT and an unrelatedwwwA record.jqthat builds the desired record list works with and without IPv6, and with an empty Terraform state.🤖 Generated with Claude Code
https://claude.ai/code/session_01G22o7QQ17GRtkCqpJNFr9B
Generated by Claude Code