mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-12-09 13:46:07 +08:00
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](
|
||
|---|---|---|
| .. | ||
| adguardhome.md | ||
| akamaiedgedns.md | ||
| autodns.md | ||
| axfrddns.md | ||
| azure_dns.md | ||
| azure_private_dns.md | ||
| bind.md | ||
| bunny_dns.md | ||
| cloudflareapi.md | ||
| cloudns.md | ||
| cnr.md | ||
| cscglobal.md | ||
| desec.md | ||
| digitalocean.md | ||
| dnsimple.md | ||
| dnsmadeeasy.md | ||
| dnsoverhttps.md | ||
| domainnameshop.md | ||
| dynadot.md | ||
| easyname.md | ||
| exoscale.md | ||
| fortigate.md | ||
| gandi_v5.md | ||
| gcloud.md | ||
| gcore.md | ||
| hedns.md | ||
| hetzner.md | ||
| hetzner_v2.md | ||
| hexonet.md | ||
| hostingde.md | ||
| huaweicloud.md | ||
| index.md | ||
| internetbs.md | ||
| inwx.md | ||
| joker.md | ||
| linode.md | ||
| loopia.md | ||
| luadns.md | ||
| mythicbeasts.md | ||
| namecheap.md | ||
| namedotcom.md | ||
| netcup.md | ||
| netlify.md | ||
| ns1.md | ||
| opensrs.md | ||
| oracle.md | ||
| ovh.md | ||
| packetframe.md | ||
| porkbun.md | ||
| powerdns.md | ||
| realtimeregister.md | ||
| route53.md | ||
| rwth.md | ||
| sakuracloud.md | ||
| softlayer.md | ||
| transip.md | ||
| vultr.md | ||