feat: add support for Storage Boxes by apricote · Pull Request #1118 · hetznercloud/cli

@apricote mentioned this pull request

Aug 7, 2025

11 tasks

phm07

@apricote apricote marked this pull request as ready for review

October 21, 2025 09:41
Adds support for the Hetzner API (`https://api.hetzner.com`) with a new
option to configure the API endpoint:

- Config Key: `hetzner-endpoint`
- Flag: `--hetzner-endpoint`
- Environment Variable: `HETZNER_ENDPOINT`

Co-authored-by: Julian Tölle <julian.toelle@hetzner-cloud.de>
Adds the CRUD commands `hcloud storage-box-type describe` and `hcloud
storage-box-type list`.

Related to #1117

---------

Co-authored-by: lukasmetzner <lukas.metzner@hetzner-cloud.de>
`snapshot_limit` and `automatic_snapshot_limit` are pointers now.
This PR implements the CRUD (create, read, update, delete) operations
for Storage Boxes.

---------

Co-authored-by: lukasmetzner <lukas.metzner@hetzner-cloud.de>
This PR implements actions for Storage Boxes.
This PR adds support for Storage Box Snapshots
This PR implements the Storage Box Subaccount resource.

@phm07 @apricote

- Bump `hcloud-go` to latest version in branch `storage-boxes` and fix
any issues.
- Use the `default-ssh-keys` Options also for Storage Box SSH Keys.
These checks are no longer necessary as the protection level is now a
pointer.

@apricote

apricote 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. You
can find out the current state of this in
[#1202](#1202).

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

```shell
hcloud storage-box create \
    --name backups \
    --type bx11 \
    --location fsn1 \
    --password "$PASSWORD" \
    --enable-ssh \
    --reachable-externally

hcloud storage-box enable-snapshot-plan backups \
    --max-snapshots 10 \
    --minute 0 \
    --hour 2
```

### Features

- **server,load-balancer**: add --ip-range argument to attach-to-network
commands (#1164)
- add support for Storage Boxes (#1118)

### Bug Fixes

- list commands print `null` instead of `[]` in JSON mode (#1191)
- outdated JSON output after creating resources (#1194)
- formatting of server-type describe output (#1196)