Skip to content

BUNNY_DNS: Add support for PullZone (PZ) record type#4053

Merged
tlimoncelli merged 3 commits intoStackExchange:mainfrom
matteocontrini:bunnydns-pz
Feb 5, 2026
Merged

BUNNY_DNS: Add support for PullZone (PZ) record type#4053
tlimoncelli merged 3 commits intoStackExchange:mainfrom
matteocontrini:bunnydns-pz

Conversation

@matteocontrini
Copy link
Copy Markdown
Contributor

@matteocontrini matteocontrini commented Feb 4, 2026

This PR adds support for the Bunny DNS custom record type PullZone (or PZ), which maps a domain name to a Bunny CDN pull zone.

It looks like this in the config:

D("example.com", REG_NONE, DnsProvider(DSP_BUNNY_DNS),
    BUNNY_DNS_PZ("@", 12345),
);

Where 12345 is the ID of the CDN pull zone, which can be retrieved from the Bunny dashboard URL (e.g. https://dash.bunny.net/cdn/5269987/general/hostnames).

It looks like this in the UI:

image

Two things for reviewers:

  • The Bunny DNS API for PZ records is very messy: when you create a PZ record you specify PullZoneID as an int64, but when you retrieve the zone records the ID is returned as a string in a field named LinkName. This isn't clearly documented so I'll confirm with Bunny support if this is the right way to do it and will report back with a comment in this PR.
  • Given the above inconsistency, I've added a unit test for the conversion and an integration test for the custom record. The integration test however requires the IDs of 2 pull zones to work (create+change). I suppose these IDs should be made configurable through profiles.json, but at a first glance I don't see other tests requiring options so for now I've left the 2 IDs hardcoded (which work only on my test account).

I may have also missed something else since this is my first contribution to this project.

Thanks!

P.S. the following integration test is failing with Bunny DNS but I believe this is unrelated to this PR:

        --- FAIL: TestDNSProviders/dmw-testdnscontrol.com/25:NS_only_APEX:Single_NS_at_apex (0.17s)

@matteocontrini
Copy link
Copy Markdown
Contributor Author

This isn't clearly documented so I'll confirm with Bunny support if this is the right way to do it and will report back with a comment in this PR.

Regarding this part, bunny.net support confirmed this is the correct way to read back the pull zone ID.

@tlimoncelli tlimoncelli merged commit 47866f9 into StackExchange:main Feb 5, 2026
2 checks passed
tlimoncelli added a commit that referenced this pull request Feb 10, 2026
#4072)

## Summary

The GoReleaser changelog regex for the "Provider-specific changes"
section used provider names that didn't always match the actual
`providerName` constants defined in the provider Go code. This caused
some provider-specific commits to be miscategorized under "Other changes
and improvements" instead.

**Real-world example from
[v4.34.0](https://github.com/StackExchange/dnscontrol/releases/tag/v4.34.0):**

The commit `47866f9: BUNNY_DNS: Add support for PullZone (PZ) record
type (#4053)` ended up under "Other changes and improvements" instead of
"Provider-specific changes", because the regex contained `bunnydns` (no
underscore) while the commit prefix uses the provider constant
`BUNNY_DNS` (with underscore).

## Changes

All regex entries are now aligned with the actual `providerName`
constants from each provider's Go source:

| Old (regex) | New (= provider constant) | Change |
|---|---|---|
| `akamaiedge` | `akamaiedgedns` | Added `dns` suffix |
| `axfrd` | `axfrddns` | Added `dns` suffix |
| `azure` | `azure_dns` | Added underscore + `dns` suffix |
| `bunnydns` | `bunny_dns` | Added underscore |
| `cloudflare` | `cloudflareapi` | Added `api` suffix |
| `cloudflareapi_old` | *(removed)* | No longer exists as a provider |
| `doh` | `dnsoverhttps` | Full constant name |
| `gandi` | `gandi_v5` | Added underscore + `v5` suffix |
| `hetznerv2` | `hetzner_v2` | Added underscore |

All 61 provider names now exactly match their `providerName` constant
(case-insensitive).

---------

Co-authored-by: Tom Limoncelli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants