feat: retrieve a server or load balancer network attachment#750
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #750 +/- ##
==========================================
+ Coverage 78.27% 78.38% +0.10%
==========================================
Files 55 55
Lines 5023 5039 +16
==========================================
+ Hits 3932 3950 +18
+ Misses 824 822 -2
Partials 267 267 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adds the `(&Server{}).PrivateNetFor(&Network{})` and `(&LoadBalancer{}).PrivateNetFor(&Network{})` methods to retrieve the private network assignation information.
1b91c37 to
f035730
Compare
apricote
approved these changes
Oct 15, 2025
lukasmetzner
pushed a commit
that referenced
this pull request
Oct 21, 2025
### Storage Box API Experimental This release adds support for the [Storage Box API](https://docs.hetzner.cloud/reference/hetzner#storage-boxes). The Storage Box integration will be introduced as an **experimental** feature. This experimental phase is expected to last until **21 November 2025**. During this period, upcoming minor releases of the project may include breaking changes to features related to the Storage Box API. This release includes all changes from the recent [Storage Box API changelog](https://docs.hetzner.cloud/changelog#2025-10-21-storage-box-api-update) entry. #### Examples ```go result, _, err := client.StorageBox.Create(ctx, hcloud.StorageBoxCreateOpts{ Name: "my-storage-box", StorageBoxType: &hcloud.StorageBoxType{Name: "bx11"}, Location: &hcloud.Location{Name: "fsn1"}, Password: "my-secure-password", SSHKeys: []*hcloud.SSHKey{{ PublicKey: "ssh-rsa AAAAB3NzaC1yc2E..." }}, Labels: map[string]string{"key": "value"}, AccessSettings: &hcloud.StorageBoxCreateOptsAccessSettings{ ReachableExternally: hcloud.Ptr(true), SSHEnabled: hcloud.Ptr(true), }, }) err = client.Action.WaitFor(ctx, result.Action) ``` ### Features - retrieve a server or load balancer network attachment (#750) - add support for Storage Boxes (#684) ### Bug Fixes - deprecate `firewall_already_removed` error code (#748) - invalid property in network add_subnet request body (#751)
apricote
pushed a commit
to hetznercloud/fleeting-plugin-hetzner
that referenced
this pull request
Oct 21, 2025
…8.0 (hetznercloud/fleeting-plugin-hetzner!294) This MR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [github.com/hetznercloud/hcloud-go/v2](https://github.com/hetznercloud/hcloud-go) | `v2.27.0` -> `v2.28.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>hetznercloud/hcloud-go (github.com/hetznercloud/hcloud-go/v2)</summary> ### [`v2.28.0`](https://github.com/hetznercloud/hcloud-go/blob/HEAD/CHANGELOG.md#v2280) [Compare Source](hetznercloud/hcloud-go@v2.27.0...v2.28.0) ##### Storage Box API Experimental This release adds support for the [Storage Box API](https://docs.hetzner.cloud/reference/hetzner#storage-boxes). The Storage Box integration will be introduced as an **experimental** feature. This experimental phase is expected to last until **21 November 2025**. During this period, upcoming minor releases of the project may include breaking changes to features related to the Storage Box API. This release includes all changes from the recent [Storage Box API changelog](https://docs.hetzner.cloud/changelog#2025-10-21-storage-box-api-update) entry. ##### Examples ```go result, _, err := client.StorageBox.Create(ctx, hcloud.StorageBoxCreateOpts{ Name: "my-storage-box", StorageBoxType: &hcloud.StorageBoxType{Name: "bx11"}, Location: &hcloud.Location{Name: "fsn1"}, Password: "my-secure-password", SSHKeys: []*hcloud.SSHKey{{ PublicKey: "ssh-rsa AAAAB3NzaC1yc2E..." }}, Labels: map[string]string{"key": "value"}, AccessSettings: &hcloud.StorageBoxCreateOptsAccessSettings{ ReachableExternally: hcloud.Ptr(true), SSHEnabled: hcloud.Ptr(true), }, }) err = client.Action.WaitFor(ctx, result.Action) ``` ##### Features - retrieve a server or load balancer network attachment ([#​750](hetznercloud/hcloud-go#750)) - add support for Storage Boxes ([#​684](hetznercloud/hcloud-go#684)) ##### Bug Fixes - deprecate `firewall_already_removed` error code ([#​748](hetznercloud/hcloud-go#748)) - invalid property in network add\_subnet request body ([#​751](hetznercloud/hcloud-go#751)) </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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTYuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE1Ni4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the
(&Server{}).PrivateNetFor(&Network{})and(&LoadBalancer{}).PrivateNetFor(&Network{})methods to retrieve the private network attachment information.