CHORE: DNSControl.org zone/zone transfer to TransIP#4204
Draft
cafferata wants to merge 1 commit into
Draft
Conversation
TomOnTime
reviewed
May 2, 2026
Collaborator
TomOnTime
left a comment
There was a problem hiding this comment.
I like the general idea of this but not the implementation.
- nitpick:
D_EXTENDis very slow. I don't want to encourage its use. - blocker: One domain per file is good. Individual files for spf, google site verification, etc. is better done as macros.
- needs more discussion: I strongly feel this should be in a separate repo. The domain is not part of the project. For example, if someone were to fork the project, I wouldn't want them to have to delete this and replace it with their own domain.
I think this needs a lot more discussion: I think what we're doing here is trying to decide what "best practice" we want to normalize for our users. I could be talked out of it, but my vision is two parts: (1) provide dnscontrol init (which I haven't tried yet) to help people get started, (2) provide a repo that shows the result of dnscontrol init so that (a) people can see what the result looks like, (b) people can see a working example that is exactly what we recommend, (c) people that don't want to or can't use init can clone this repo as an alternative way of getting started.
9 tasks
TomOnTime
pushed a commit
that referenced
this pull request
May 12, 2026
I ran into this same issue while working on #4208 and can confirm the behavior @stefanwascoding describes. The only form that works requires the provider name explicitly: ```shell dnscontrol get-zones transip TRANSIP all ``` ```text WARNING: To retain compatibility in future versions, please change "TRANSIP" to "-". See "https://docs.dnscontrol.org/commands/get-zones" ``` But following that suggestion also fails: ```shell dnscontrol get-zones transip - all ``` ```text Arguments should be: credskey providername zone(s) (Ex: r53 ROUTE53 example.com) ``` So neither the documented 2 argument form (`transip all`) nor the suggested dash form (`transip - all`) works. This pull request fixes the argument parsing so that `get-zones` accepts 2 arguments (`credkey zone`), resolving the provider type from the `TYPE` field in `creds.json`. The old 3 argument form still works but now shows a deprecation warning with the correct command: ```shell dnscontrol get-zones transip TRANSIP all ``` ```text WARNING: The provider name argument is deprecated. Please use "dnscontrol get-zones transip all" instead. See "https://docs.dnscontrol.org/commands/get-zones" ``` With 3+ arguments, the code now detects whether the second argument is a registered provider type to distinguish the deprecated form (`credkey provider zone...`) from the new multi-zone form (`credkey zone1 zone2...`): ```shell dnscontrol get-zones --format=nameonly transip dnscontrol.org dnscontrol.nl ``` ```text dnscontrol.org dnscontrol.nl ``` Additionally: - CLI help is shortened and links to online documentation - Examples use descriptive `credkey` names (`my_route53` instead of `myr53`) so they are self-explanatory without the provider name - `Documentation:` links are added to `get-zones` and `check-creds` - `documentation/commands/get-zones.md` is updated to match Tested against the TransIP provider with the `dnscontrol.org` zone from #4204. - [x] `go test ./commands/` - [x] `dnscontrol get-zones transip all` (2 args, new style) - [x] `dnscontrol get-zones transip dnscontrol.org` (specific zone) - [x] `dnscontrol get-zones transip dnscontrol.org dnscontrol.nl` (multiple zones, new style) - [x] `dnscontrol get-zones transip TRANSIP all` (3 args, deprecation warning) - [x] `dnscontrol get-zones transip` (too few args, error message) - [x] `dnscontrol get-zones --format=zone transip dnscontrol.org` - [x] `dnscontrol get-zones --format=tsv transip dnscontrol.org` - [x] `dnscontrol get-zones --format=nameonly transip all` <details> <summary>CLI diff</summary> ```diff --- before (v4.37.1) +++ after @@ -2,7 +2,7 @@ dnscontrol get-zones - gets a zone from a provider (stand-alone) USAGE: - dnscontrol get-zones [command options] credkey provider zone [...] + dnscontrol get-zones [command options] credkey zone [...] CATEGORY: utility @@ -11,34 +11,18 @@ Download a zone from a provider. This is a stand-alone utility. ARGUMENTS: - credkey: The name used in creds.json (first parameter to NewDnsProvider() in dnsconfig.js) + credkey: The name used in creds.json - provider: The name of the provider (second parameter to NewDnsProvider() in dnsconfig.js) zone: One or more zones (domains) to download; or "all". - FORMATS: - --format=js dnsconfig.js format (not perfect, just a decent first draft) - --format=djs js with disco commas (leading commas) - --format=zone BIND zonefile format - --format=tsv TAB separated value (useful for AWK) - --format=nameonly Just print the zone names - - The columns in --format=tsv are: - FQDN (the label with the domain) - ShortName (just the label, "@" if it is the naked domain) - TTL - Record Type (A, AAAA, CNAME, etc.) - Target and arguments (quoted like in a zonefile) - Either empty or a comma-separated list of properties like "cloudflare_proxy=true" - - The --ttl flag only applies to zone/js/djs formats. - EXAMPLES: - dnscontrol get-zones myr53 ROUTE53 example.com - dnscontrol get-zones gmain GANDI_V5 example.com other.com - dnscontrol get-zones cfmain CLOUDFLAREAPI all - dnscontrol get-zones --format=tsv bind BIND example.com - dnscontrol get-zones --format=djs --out=draft.js gcloud GCLOUD example.com + dnscontrol get-zones my_route53 example.com + dnscontrol get-zones my_gandi example.com other.com + dnscontrol get-zones my_cloudflare all + dnscontrol get-zones --format=tsv my_bind example.com + dnscontrol get-zones --format=djs --out=draft.js my_gcloud example.com + Documentation: https://docs.dnscontrol.org/commands/get-zones + OPTIONS: --creds string Provider credentials JSON file (or !program to execute program that outputs json) (default: "creds.json") --format string Output format: js djs zone tsv nameonly (default: "zone") ``` </details> Fixes #4235
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.
Initial zone configuration for
dnscontrol.org, based on the records provided by @TomOnTime.Records
ALIAS @→stackexchange.github.io.CNAME docs→db3053e25d-hosting.gitbook.io.CNAME www→dnscontrol.org.TXT @Google Search Console verificationSPF_NONE(domain does not send email)Notes: The zone is staged ahead of the domain transfer. Nameservers will be pointed to the new registrar (TransIP) once Stack completes the transfer.