Skip to content

feat(primary-ip): assignee_type is optional when creating a primary ip#840

Merged
lukasmetzner merged 1 commit intomainfrom
optional-assignee-type
Apr 28, 2026
Merged

feat(primary-ip): assignee_type is optional when creating a primary ip#840
lukasmetzner merged 1 commit intomainfrom
optional-assignee-type

Conversation

@lukasmetzner
Copy link
Copy Markdown
Contributor

@lukasmetzner lukasmetzner commented Apr 28, 2026

Primary IPs assignee_type behavior change

As of 1 August 2026, the behavior of the Primary IP assignee_type property will change, and will return unassigned when the Primary IP is not assigned (when assignee_id is null). The goal is to eventually assign Primary IPs to other resource types, not only to server.

See the changelog for more details.

In addition, the Primary IP request body assignee_type property of the operation POST /v1/primary_ips is now optional. Primary IPs created without assignee_type return server until 1 August 2026, after this date, its value will be unassigned.

See the changelog for more details.

@lukasmetzner lukasmetzner requested a review from a team as a code owner April 28, 2026 11:28
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.27%. Comparing base (eafab24) to head (d9470a9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #840      +/-   ##
==========================================
+ Coverage   77.75%   79.27%   +1.51%     
==========================================
  Files          61       61              
  Lines        5899     4599    -1300     
==========================================
- Hits         4587     3646     -941     
+ Misses       1008      649     -359     
  Partials      304      304              

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

@lukasmetzner lukasmetzner merged commit a7088e5 into main Apr 28, 2026
5 of 6 checks passed
@lukasmetzner lukasmetzner deleted the optional-assignee-type branch April 28, 2026 11:44
lukasmetzner pushed a commit that referenced this pull request Apr 28, 2026
### Primary IPs `assignee_type` behavior change

As of 1 August 2026, the behavior of the [Primary
IP](https://pkg.go.dev/github.com/hetznercloud/hcloud-go/v2/hcloud#PrimaryIP)
`assignee_type` property will change, and will return `unassigned` when
the [Primary
IP](https://pkg.go.dev/github.com/hetznercloud/hcloud-go/v2/hcloud#PrimaryIP)
is not assigned (when `assignee_id` is `null`). The goal is to
eventually assign Primary IPs to other resource types, not only to
`server`.

See the
[changelog](https://docs.hetzner.cloud/changelog#2026-04-27-primary-ips-will-return-unassigned)
for more details.

In addition, the [Primary IP request
body](https://pkg.go.dev/github.com/hetznercloud/hcloud-go/v2/hcloud#PrimaryIPCreateOpts)
`assignee_type` property of the operation [`POST
/v1/primary_ips`](https://docs.hetzner.cloud/reference/cloud#tag/primary-ips/create_primary_ip)
is now optional. Primary IPs created without `assignee_type` return
`server` until 1 August 2026, after this date, its value will be
`unassigned`.

See the
[changelog](https://docs.hetzner.cloud/changelog#2026-04-27-primary-ips-make-assignee_type-optional)
for more details.

### Features

- **primary-ip**: `assignee_type` is optional when creating a primary ip
(#840)
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.

2 participants