feat(server,primary-ip): deprecate datacenter by phm07 · Pull Request #1278 · hetznercloud/cli

@phm07 marked this pull request as ready for review

December 18, 2025 16:57

apricote

@phm07

@phm07

@phm07

jooola

@apricote

@apricote

jooola

@jooola

@apricote

apricote

jooola pushed a commit that referenced this pull request

Jan 5, 2026
<!-- section-start changelog -->
### Deprecation of `datacenter` attribute for Primary IPs and Servers

The `datacenter` attribute is deprecated in the `Primary IPs` and
`Servers` API resources and will be removed after 1 July 2026. See
https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters
for more details.

The `location` attribute already exists for Servers, and was added for
Primary IPs.

Therefor the `datacenter` attribute is deprecated in favor of the
`location` attribute in the following commands:

- `hcloud server create`
- `hcloud server describe`
- `hcloud server list`
- `hcloud primary-ip create`
- `hcloud primary-ip describe`
- `hcloud primary-ip list`

In list commands, the `datacenter` columns is not longer shown by
default, and is replaced with the `location` column.

### Features

- **server,primary-ip**: deprecate datacenter (#1278)

<!-- 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
### Deprecation of `datacenter` attribute for Primary IPs and Servers

The `datacenter` attribute is deprecated in the `Primary IPs` and
`Servers` API resources and will be removed after 1 July 2026. See
https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters
for more details.

The `location` attribute already exists for Servers, and was added for
Primary IPs.

Therefor the `datacenter` attribute is deprecated in favor of the
`location` attribute in the following commands:

- `hcloud server create`
- `hcloud server describe`
- `hcloud server list`
- `hcloud primary-ip create`
- `hcloud primary-ip describe`
- `hcloud primary-ip list`

In list commands, the `datacenter` columns is not longer shown by
default, and is replaced with the `location` column.
~~~~

### Suffix / End

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

~~~~rp-suffix
~~~~

</details>

Co-authored-by: Hetzner Cloud Bot <>