Skip to content

Conversation

@phm07
Copy link
Contributor

@phm07 phm07 commented Dec 18, 2025

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.

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 44.92754% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.50%. Comparing base (5c66664) to head (868e633).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/cmd/server/create.go 18.18% 18 Missing ⚠️
internal/cmd/primaryip/create.go 65.38% 7 Missing and 2 partials ⚠️
internal/cmd/primaryip/describe.go 33.33% 3 Missing and 1 partial ⚠️
internal/cmd/server/describe.go 42.85% 3 Missing and 1 partial ⚠️
internal/cmd/server/list.go 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1278      +/-   ##
==========================================
- Coverage   72.67%   72.50%   -0.18%     
==========================================
  Files         302      302              
  Lines       10954    10995      +41     
==========================================
+ Hits         7961     7972      +11     
- Misses       2125     2150      +25     
- Partials      868      873       +5     
Flag Coverage Δ
e2e 51.71% <26.08%> (-0.15%) ⬇️
unit 67.48% <44.92%> (-0.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@phm07 phm07 marked this pull request as ready for review December 18, 2025 16:57
@phm07 phm07 requested a review from a team as a code owner December 18, 2025 16:57
@phm07 phm07 force-pushed the deprecate-datacenter branch from f0fd735 to be26110 Compare January 2, 2026 12:26
@apricote apricote force-pushed the deprecate-datacenter branch from 772b152 to 868e633 Compare January 5, 2026 16:04
@apricote apricote merged commit 0a4103f into main Jan 5, 2026
7 checks passed
@apricote apricote deleted the deprecate-datacenter branch January 5, 2026 16:11
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 <>
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.

4 participants