feat: remove datacenter property from server and primary_ip#1460
Open
lukasmetzner wants to merge 3 commits into
Open
feat: remove datacenter property from server and primary_ip#1460lukasmetzner wants to merge 3 commits into
lukasmetzner wants to merge 3 commits into
Conversation
Remove the `datacenter` property from Server and Primary IP resource where possible. The property was deprecated ~6 months ago, and because the property is removed from the API, removing it from our code is not considered a breaking change. Changelog entry: https://docs.hetzner.cloud/changelog#2026-07-01-removing-datacenters
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1460 +/- ##
==========================================
+ Coverage 72.89% 73.12% +0.23%
==========================================
Files 300 300
Lines 11127 11081 -46
==========================================
- Hits 8111 8103 -8
+ Misses 2118 2084 -34
+ Partials 898 894 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jooola
reviewed
Jul 22, 2026
|
|
||
| Create a Primary IP. | ||
|
|
||
| The --datacenter flag is deprecated. Use --location or --assignee-id instead. |
Member
There was a problem hiding this comment.
Could we maybe keep a little reference to the --datacenter in the docs? .e.g that is has been removed?
Contributor
Author
There was a problem hiding this comment.
Added a little note to PrimaryIP and Server with a link to the changelog.
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.
Remove the
datacenterproperty from Server and Primary IP resource wherepossible. The property was deprecated ~6 months ago, and because the property
is removed from the API, removing it from our code is not considered a breaking
change.
Changelog entry: https://docs.hetzner.cloud/changelog#2026-07-01-removing-datacenters