Skip to content

Conversation

@jooola
Copy link
Member

@jooola jooola commented Oct 7, 2025

Add support for the new DNS API.

The DNS API is currently in beta.

See the DNS API beta changelog for more details.

@jooola jooola requested a review from a team as a code owner October 7, 2025 08:12
@codecov
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

❌ Patch coverage is 65.74257% with 173 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.31%. Comparing base (4fc2c7f) to head (da7f5f8).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
hcloud/zone_rrset.go 59.31% 72 Missing and 35 partials ⚠️
hcloud/zone.go 72.22% 38 Missing and 17 partials ⚠️
hcloud/schema.go 83.33% 6 Missing ⚠️
hcloud/schema_gen.go 28.57% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #740      +/-   ##
==========================================
- Coverage   79.57%   78.31%   -1.26%     
==========================================
  Files          53       55       +2     
  Lines        4518     5023     +505     
==========================================
+ Hits         3595     3934     +339     
- Misses        706      822     +116     
- Partials      217      267      +50     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Add support for the new [DNS API](https://docs.hetzner.cloud/reference/cloud#dns).

The DNS API is currently in **beta**.

See the [DNS API beta changelog](https://docs.hetzner.cloud/changelog#2025-10-07-dns-beta) for more details.

Co-authored-by: Lukas Metzner <lukas.metzner@hetzner-cloud.de>
Co-authored-by: phm07 <22707808+phm07@users.noreply.github.com>
@jooola jooola merged commit 936ffe3 into main Oct 7, 2025
3 checks passed
@jooola jooola deleted the dns branch October 7, 2025 08:15
jooola pushed a commit that referenced this pull request Oct 7, 2025
<!-- section-start changelog -->
### DNS API Beta

This release adds support for the new [DNS
API](https://docs.hetzner.cloud/reference/cloud#dns).

The DNS API is currently in **beta**, which will likely end on 10
November 2025. After the beta ended, it will no longer be possible to
create new zones in the old DNS system. See the [DNS Beta
FAQ](https://docs.hetzner.com/networking/dns/faq/beta) for more details.

Future minor releases of this project may include breaking changes for
features that are related to the DNS API.

See the [DNS API Beta
changelog](https://docs.hetzner.cloud/changelog#2025-10-07-dns-beta) for
more details.

**Examples**

```go
result, _, err := client.Zone.Create(ctx, hcloud.ZoneCreateOpts{
	Name:   "example.com",
	Mode:   hcloud.ZoneModePrimary,
	Labels: map[string]string{"key": "value"},
	RRSets: []hcloud.ZoneCreateOptsRRSet{
		{
			Name: "@",
			Type: hcloud.ZoneRRSetTypeA,
			Records: []hcloud.ZoneRRSetRecord{
				{Value: "201.180.75.2", Comment: "server1"},
			},
		},
	},
})

err = client.Action.WaitFor(ctx, result.Action)
zone = result.Zone
```

### Features

- support the new DNS API (#740)

<!-- section-end changelog -->

---

<details>
<summary><h4>PR by <a
href="https://github.com/apricote/releaser-pleaser">releaser-pleaser</a>
🤖</h4></summary>

If you want to modify the proposed release, add you overrides here. You
can learn more about the options in the docs.

## Release Notes

### Prefix / Start

This will be added to the start of the release notes.

~~~~rp-prefix
### DNS API Beta

This release adds support for the new [DNS
API](https://docs.hetzner.cloud/reference/cloud#dns).

The DNS API is currently in **beta**, which will likely end on 10
November 2025. After the beta ended, it will no longer be possible to
create new zones in the old DNS system. See the [DNS Beta
FAQ](https://docs.hetzner.com/networking/dns/faq/beta) for more details.

Future minor releases of this project may include breaking changes for
features that are related to the DNS API.

See the [DNS API Beta
changelog](https://docs.hetzner.cloud/changelog#2025-10-07-dns-beta) for
more details.

**Examples**

```go
result, _, err := client.Zone.Create(ctx, hcloud.ZoneCreateOpts{
	Name:   "example.com",
	Mode:   hcloud.ZoneModePrimary,
	Labels: map[string]string{"key": "value"},
	RRSets: []hcloud.ZoneCreateOptsRRSet{
		{
			Name: "@",
			Type: hcloud.ZoneRRSetTypeA,
			Records: []hcloud.ZoneRRSetRecord{
				{Value: "201.180.75.2", Comment: "server1"},
			},
		},
	},
})

err = client.Action.WaitFor(ctx, result.Action)
zone = result.Zone
```
~~~~

### Suffix / End

This will be added to the end of the release notes.

~~~~rp-suffix
~~~~

</details>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
apricote pushed a commit to hetznercloud/fleeting-plugin-hetzner that referenced this pull request Oct 8, 2025
…7.0 (hetznercloud/fleeting-plugin-hetzner!289)

This MR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [github.com/hetznercloud/hcloud-go/v2](https://github.com/hetznercloud/hcloud-go) | `v2.26.0` -> `v2.27.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fhetznercloud%2fhcloud-go%2fv2/v2.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fhetznercloud%2fhcloud-go%2fv2/v2.26.0/v2.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>hetznercloud/hcloud-go (github.com/hetznercloud/hcloud-go/v2)</summary>

### [`v2.27.0`](https://github.com/hetznercloud/hcloud-go/blob/HEAD/CHANGELOG.md#v2270)

[Compare Source](hetznercloud/hcloud-go@v2.26.0...v2.27.0)

##### DNS API Beta

This release adds support for the new [DNS API](https://docs.hetzner.cloud/reference/cloud#dns).

The DNS API is currently in **beta**, which will likely end on 10 November 2025. After the beta ended, it will no longer be possible to create new zones in the old DNS system. See the [DNS Beta FAQ](https://docs.hetzner.com/networking/dns/faq/beta) for more details.

Future minor releases of this project may include breaking changes for features that are related to the DNS API.

See the [DNS API Beta changelog](https://docs.hetzner.cloud/changelog#2025-10-07-dns-beta) for more details.

**Examples**

```go
result, _, err := client.Zone.Create(ctx, hcloud.ZoneCreateOpts{
	Name:   "example.com",
	Mode:   hcloud.ZoneModePrimary,
	Labels: map[string]string{"key": "value"},
	RRSets: []hcloud.ZoneCreateOptsRRSet{
		{
			Name: "@&#8203;",
			Type: hcloud.ZoneRRSetTypeA,
			Records: []hcloud.ZoneRRSetRecord{
				{Value: "201.180.75.2", Comment: "server1"},
			},
		},
	},
})

err = client.Action.WaitFor(ctx, result.Action)
zone = result.Zone
```

##### Features

- support the new DNS API ([#&#8203;740](hetznercloud/hcloud-go#740))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMzguNCIsInVwZGF0ZWRJblZlciI6IjQxLjEzOC40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants