feat: add support for Storage Boxes#684
Merged
lukasmetzner merged 32 commits intomainfrom Oct 21, 2025
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #684 +/- ##
==========================================
+ Coverage 78.24% 78.53% +0.28%
==========================================
Files 55 59 +4
Lines 5039 5619 +580
==========================================
+ Hits 3943 4413 +470
- Misses 827 912 +85
- Partials 269 294 +25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
992641b to
2d340eb
Compare
phm07
reviewed
Aug 20, 2025
phm07
reviewed
Aug 20, 2025
ff07920 to
aa5a527
Compare
phm07
reviewed
Sep 3, 2025
phm07
reviewed
Sep 5, 2025
phm07
reviewed
Sep 8, 2025
phm07
reviewed
Sep 8, 2025
phm07
reviewed
Sep 8, 2025
ee914b1 to
39b8d99
Compare
phm07
reviewed
Sep 18, 2025
39b8d99 to
8c628b8
Compare
a4842c1 to
20e0a5f
Compare
jooola
reviewed
Oct 16, 2025
jooola
reviewed
Oct 16, 2025
jooola
reviewed
Oct 16, 2025
jooola
reviewed
Oct 16, 2025
jooola
reviewed
Oct 16, 2025
jooola
reviewed
Oct 16, 2025
a00ef9f to
8a77911
Compare
Adds support for the new Hetzner API with a shallow copy of the original client. The new options `WithHetznerEndpoints` is marked as experimental for now. --------- Co-authored-by: Julian Tölle <[email protected]>
We can use the same API endpoint here, as this is a local server for testing, where we define the responses ourselves.
Reference to API docs: https://docs.hetzner.cloud/reference/hetzner#storage-box-types --------- Co-authored-by: Julian Tölle <[email protected]>
This PR adds missing schema conversion functions and makes some conversions more consistent with other resources
`hcloud.StorageBox` is part of `hcloud.StorageBoxSubaccount` and `hcloud.StorageBoxSnapshot`. Therefore, we can remove the storage box reference from the function parameters.
Co-authored-by: Jonas L. <[email protected]>
Co-authored-by: Jonas L. <[email protected]>
Member
|
ℹ️ I am currently fixing a bunch of things here. |
Member
Done, please see #752 |
Additional fixes for the storage boxes implementation.
jooola
reviewed
Oct 17, 2025
`ExampleStorageBoxClient_Create` and `ExampleStorageBoxClient_Create` are two examples, which can be expanded in the `func (*StorageBoxClient) [Create]` section of the https://pkg.go.dev/ docs.
Omitted the changelog reference, as there is no sensible one. I have opted for `[StorageBoxClient] is experimental`, as this puts a focus on the hcloud-go integration being experimental instead of the product.
jooola
approved these changes
Oct 21, 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.
We collect all changes for the Storage Box support (#675) in this PR. It will only be merged when everything is implemented through smaller pull requests targetting the
storage-boxesbranch.Closes #675