dnscontrol/providers
Jakob Ackermann 1e67585e8f
HETZNER_V2: Add provider for Hetzner DNS API (#3837)
Closes https://github.com/StackExchange/dnscontrol/issues/3787

This PR is adding a `HETZNER_V2` provider for the "new" Hetzner DNS API.

Testing:
- The integration tests are passing.
- Manual testing:
  - `preview` (see diff for existing zone)
- `preview --populate-on-preview` (see full diff for newly created zone)
  - `push` (see full diff; no diff after push)
- `push` (see full diff; no diff after push to newly created zone --
i.e. single pass and done)

```js
var REG_NONE = NewRegistrar('none')
var DSP = NewDnsProvider('HETZNER_V2')

D('testing-2025-11-14-7.dev', REG_NONE, DnsProvider(DSP),
    A('@', '127.0.0.1')
)
```

<details>

```
# push for newly created zone
CONCURRENTLY checking for 1 zone(s)
SERIALLY checking for 0 zone(s)
Waiting for concurrent checking(s) to complete...DONE
******************** Domain: testing-2025-11-14-7.dev
1 correction (HETZNER_V2)
#1: Ensuring zone "testing-2025-11-14-7.dev" exists in "HETZNER_V2"
SUCCESS!
CONCURRENTLY gathering records of 1 zone(s)
SERIALLY gathering records of 0 zone(s)
Waiting for concurrent gathering(s) to complete...DONE
******************** Domain: testing-2025-11-14-7.dev
4 corrections (HETZNER_V2)
#1: ± MODIFY-TTL testing-2025-11-14-7.dev NS helium.ns.hetzner.de. ttl=(3600->300)
± MODIFY-TTL testing-2025-11-14-7.dev NS hydrogen.ns.hetzner.com. ttl=(3600->300)
± MODIFY-TTL testing-2025-11-14-7.dev NS oxygen.ns.hetzner.com. ttl=(3600->300)
SUCCESS!
#2: + CREATE testing-2025-11-14-7.dev A 127.0.0.1 ttl=300
SUCCESS!
Done. 5 corrections.
```
</details>

Feedback for @jooola and @LKaemmerling:
- The SDK was very useful in getting 80% there! Nice! 🎉 
- Footgun:
- The `result` values are not "up-to-date" after waiting for an
`Action`, e.g. `Zone.AuthoritativeNameservers.Assigned` is not set when
`Client.Zone.Create()` returns and the following "wait" will not update
it.
- Taking a step back here: Waiting for an `Action` with a separate SDK
call does not seem very natural to me. Does the SDK-user need to know
that you are processing operations asynchronous? (Which seems like an
implementation detail to me, something that the SDK could abstrct over.)
Can `Client.Zone.Create()` return the final `Zone` instead of the
intermediate result?
- Features missing compared to the DNS Console, in priority order:
- It is no longer possible to remove your provided name servers from the
root/apex. Use-case: dual-home/multi-home zone with fewer than three
servers from Hetzner. I'm operating one of these and cannot migrate over
until this is fixed.
- Performance regression due to lack of bulk create/modify. E.g. [one of
the test
suites](a71b89e5a2/integrationTest/integration_test.go (L619))
spends about 4.5 minutes on making creating 100 record-sets and then
another 4 minutes for deleting them in sequence again. With your async
API, these are `create 2*100 + delete 2*100 = 400` API calls.
Previously, these were `create 1 + delete 100 = 101` API calls. Are you
planning on adding batch processing again?
- Usability nits
- Compared to other record-set based APIs, upserts for record-sets are
missing. This applies to records of a record-set and the ttl of the
record-set (see separate SDK calls for the cases `diff2.CREATE` vs
`diff2.CHANGE` and two calls in `diff2.CHANGE` for updating the TTL vs
records).
- Some SDK methods return an `Action` (e.g. `Zone.ChangeRRSetTTL()`),
others wrap the `Action` in a struct (`Client.Zone.CreateRRSet()`) --
even when the struct has a single field (`ZoneRRSetDeleteResult`).

---------

Co-authored-by: "Jonas L." <jooola@users.noreply.github.com>
Co-authored-by: "Lukas Kämmerling" <LKaemmerling@users.noreply.github.com>
Co-authored-by: Tom Limoncelli <6293917+tlimoncelli@users.noreply.github.com>
2025-11-30 09:14:54 -05:00
..
_all HETZNER_V2: Add provider for Hetzner DNS API (#3837) 2025-11-30 09:14:54 -05:00
adguardhome NEW PROVIDER: ADGUARDHOME (#3638) 2025-07-09 12:06:34 -04:00
akamaiedgedns AKAMAIEDGEDNS: Add ALIAS and AKAMAITLC support to the Akamai Edge DNS provider (#3836) 2025-11-14 09:48:42 -05:00
autodns POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
axfrddns AXFRDDNS: Chunk large changes in multiple packets (#3732) 2025-08-28 12:27:18 -04:00
azuredns POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
azureprivatedns POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
bind BUGFIX: IDN support is broken for domain names (#3845) 2025-11-29 12:17:44 -05:00
bunnydns POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
cloudflare CLOUDFLAREAPI: Skip read-only records inserted by provider (#3850) (#3852) 2025-11-24 20:28:38 -05:00
cloudns POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
cnr POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
cscglobal Warn if IGNORE() is unreliable for this provider (#3683) 2025-07-30 20:41:49 -04:00
desec POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
digitalocean CHORE: Maintainer changes for OPENSRS and DIGITALOCEAN (#3849) 2025-11-24 20:29:43 -05:00
dnsimple Warn if IGNORE() is unreliable for this provider (#3683) 2025-07-30 20:41:49 -04:00
dnsmadeeasy POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
doh DOCS: Reclassify providers concurrency status (#3518) 2025-04-02 16:36:00 -04:00
domainnameshop Warn if IGNORE() is unreliable for this provider (#3683) 2025-07-30 20:41:49 -04:00
dynadot DOCS: Reclassify providers concurrency status (#3518) 2025-04-02 16:36:00 -04:00
easyname DOCS: Reclassify providers concurrency status (#3518) 2025-04-02 16:36:00 -04:00
exoscale POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
fortigate POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
gandiv5 GANDI_V5: Increase API timeouts (#3770) 2025-09-15 14:02:47 -04:00
gcloud POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
gcore POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
hedns POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
hetzner POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
hetznerv2 HETZNER_V2: Add provider for Hetzner DNS API (#3837) 2025-11-30 09:14:54 -05:00
hexonet POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
hostingde POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
huaweicloud POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
internetbs DOCS: Reclassify providers concurrency status (#3518) 2025-04-02 16:36:00 -04:00
inwx INWX: Fix INWX provider after their unexpected data-type breaking-change (#3855) 2025-11-29 12:17:13 -05:00
joker POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
linode Warn if IGNORE() is unreliable for this provider (#3683) 2025-07-30 20:41:49 -04:00
loopia security fix: Prevent exposure of creds in debug output (#3733) 2025-08-19 10:47:02 -04:00
luadns POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
mythicbeasts MYTHICBEASTS: Mark as concurrent verified. (#3631) 2025-06-20 10:50:22 -04:00
namecheap NAMECHEAP: Enable get-zones (#3775) 2025-09-29 13:43:03 -04:00
namedotcom Warn if IGNORE() is unreliable for this provider (#3683) 2025-07-30 20:41:49 -04:00
netcup NETCUP: add TLSA support (#3802) 2025-10-23 10:41:35 -04:00
netlify Warn if IGNORE() is unreliable for this provider (#3683) 2025-07-30 20:41:49 -04:00
ns1 POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
opensrs CHORE: Maintainer changes for OPENSRS and DIGITALOCEAN (#3849) 2025-11-24 20:29:43 -05:00
oracle POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
ovh DOCS: Reclassify providers concurrency status (#3518) 2025-04-02 16:36:00 -04:00
packetframe Warn if IGNORE() is unreliable for this provider (#3683) 2025-07-30 20:41:49 -04:00
porkbun CHORE: Upgrade github.com/failsafe-go/failsafe-go v0.6.9 to v0.7.0 (#3760) 2025-09-02 10:59:45 -04:00
powerdns BUGFIX: IDN support is broken for domain names (#3845) 2025-11-29 12:17:44 -05:00
realtimeregister POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
route53 POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
rwth Warn if IGNORE() is unreliable for this provider (#3683) 2025-07-30 20:41:49 -04:00
sakuracloud POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
softlayer Warn if IGNORE() is unreliable for this provider (#3683) 2025-07-30 20:41:49 -04:00
transip TRANSIP: Pause when rate-limited (#3378) 2025-01-16 14:17:47 -05:00
vultr POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00
capabilities.go AKAMAIEDGEDNS: Add ALIAS and AKAMAITLC support to the Akamai Edge DNS provider (#3836) 2025-11-14 09:48:42 -05:00
capability_string.go AKAMAIEDGEDNS: Add ALIAS and AKAMAITLC support to the Akamai Edge DNS provider (#3836) 2025-11-14 09:48:42 -05:00
providers.go POWERDNS: Zone creation now abides by variant tags (#3830) 2025-11-05 09:33:47 -05:00