Unmanaged DNS domains are not detected
Situation: User creates a domain using the web interface. It is not included in dnsconfig.js. Months later the domain data is corrupted and DNSControl does not have any info useful for restoring the domain.
There should be a way to get a warning about domains that are not managed by dnscontrol.
One thing I've played with is some kind of check-expirations command that would crawl your registrar accounts and spit out expiration info and/or warn about expirations. The idea being you could wire it up to monitoring somehow.
Maybe this is a similar use case? Does this apply to non-registrars as well? I suppose it might.
Yes, this could be similar to your check-expirations command. It applies to both registrar and non-registrars. Maybe this new tool could spit out the necessary records to be added to dnsconfig.js which would make migration a lot easier. See also #78
If a provider is a ZoneLister(), it could warn if there are domains not mentioned in dnsconfig.js.
Proposed algorithm:
dlist = list of domains mentioned in dnsconfig.js
For each DSP:
plist = get-zones --format=nameonly
print dlist - plist
Desired output: (proposal)
WARNING:
The following domains exist at the provider but are not in dnsconfig.js:
DNS Provider: gcloudmain: (get-zones reveals 40 zones)
example.com: Not in dnsconfig.js
example2.com: Not in dnsconfig.js
DNS Provider: smallerdsp:
NOTE: DSP does not support GetZones(); diagnostic not possible
DNS Provider: azureprime: (get-zones reveals 10 zones)
no issues
Exit code is 0 if no "Not in dnsconfig.js" messages generated.