feat: allow creating load balancers with primary ips - #700
Merged
Merged
Conversation
wneessen
approved these changes
Oct 5, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #700 +/- ##
==========================================
+ Coverage 97.34% 97.40% +0.06%
==========================================
Files 76 76
Lines 4101 4128 +27
==========================================
+ Hits 3992 4021 +29
+ Misses 109 107 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jooola
pushed a commit
that referenced
this pull request
Oct 5, 2026
<!-- section-start changelog --> ### Load Balancers can now be created with existing Primary IPs Primary IPs, which were previously available exclusively for Servers, are now also available for Load Balancers. When creating a Load Balancer, you can assign an [existing Primary IP](https://docs.hetzner.cloud/reference/cloud#tag/primary-ips/list_primary_ips) instead of having an IP address allocated automatically. Currently, you cannot change the Primary IP once the Load Balancer has been created. To support this change, we added the new `public_net` property to the request body of the endpoint [POST /load_balancers](https://docs.hetzner.cloud/reference/cloud#tag/load-balancers/create_load_balancer), with the following child properties: - `public_net.ipv4`: ID of an IPv4 Primary IP to assign to the Load Balancer. - `public_net.ipv6`: ID of an IPv6 Primary IP to assign to the Load Balancer. If you omit a property, a new Primary IP of that version is allocated for the Load Balancer, as before. A Primary IP can currently only be assigned when the Load Balancer is created. It stays assigned for the entire lifetime of the Load Balancer. Related to https://docs.hetzner.cloud/changelog#2026-10-05-load-balancers-can-use-existing-primary-ips. ### Deleting a Load Balancer now returns an Action > [!IMPORTANT] > Please update all code that uses the `LoadBalancersClient.delete` method to wait on the newly returned action. As part of our work on supporting [existing Primary IPs for Load Balancers](https://docs.hetzner.cloud/changelog#2026-10-05-load-balancers-can-use-existing-primary-ips), deleting a Load Balancer is now tracked with an Action. The endpoint [DELETE /load_balancers/{id}](https://docs.hetzner.cloud/reference/cloud#tag/load-balancers/delete_load_balancer) now returns a 201 status code with an Action in the response body, instead of a 204 status code with an empty response body. You can use the returned Action to track the progress of the deletion. Related to https://docs.hetzner.cloud/changelog#2026-10-05-delete-load-balancer-returns-action. ### Features - allow creating load balancers with primary ips (#700) ([84e3a19](84e3a19)) - delete load balancer now returns an action (#700) ([84e3a19](84e3a19)) <!-- 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 ### Load Balancers can now be created with existing Primary IPs Primary IPs, which were previously available exclusively for Servers, are now also available for Load Balancers. When creating a Load Balancer, you can assign an [existing Primary IP](https://docs.hetzner.cloud/reference/cloud#tag/primary-ips/list_primary_ips) instead of having an IP address allocated automatically. Currently, you cannot change the Primary IP once the Load Balancer has been created. To support this change, we added the new `public_net` property to the request body of the endpoint [POST /load_balancers](https://docs.hetzner.cloud/reference/cloud#tag/load-balancers/create_load_balancer), with the following child properties: - `public_net.ipv4`: ID of an IPv4 Primary IP to assign to the Load Balancer. - `public_net.ipv6`: ID of an IPv6 Primary IP to assign to the Load Balancer. If you omit a property, a new Primary IP of that version is allocated for the Load Balancer, as before. A Primary IP can currently only be assigned when the Load Balancer is created. It stays assigned for the entire lifetime of the Load Balancer. Related to https://docs.hetzner.cloud/changelog#2026-10-05-load-balancers-can-use-existing-primary-ips. ### Deleting a Load Balancer now returns an Action > [!IMPORTANT] > Please update all code that uses the `LoadBalancersClient.delete` method to wait on the newly returned action. As part of our work on supporting [existing Primary IPs for Load Balancers](https://docs.hetzner.cloud/changelog#2026-10-05-load-balancers-can-use-existing-primary-ips), deleting a Load Balancer is now tracked with an Action. The endpoint [DELETE /load_balancers/{id}](https://docs.hetzner.cloud/reference/cloud#tag/load-balancers/delete_load_balancer) now returns a 201 status code with an Action in the response body, instead of a 204 status code with an empty response body. You can use the returned Action to track the progress of the deletion. Related to https://docs.hetzner.cloud/changelog#2026-10-05-delete-load-balancer-returns-action. ~~~~ ### Suffix / End This will be added to the end of the release notes. ~~~~rp-suffix ~~~~ </details> Co-authored-by: Hetzner Cloud Bot <>
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.
Primary IPs, which were previously available exclusively for Servers, are now also available for Load Balancers. When creating a Load Balancer, you can assign an existing Primary IP instead of having an IP address allocated automatically. Currently, you cannot change the Primary IP once the Load Balancer has been created.
To support this change, we added the new
public_netproperty to the request body of the endpoint POST /load_balancers, with the following child properties:public_net.ipv4: ID of an IPv4 Primary IP to assign to the Load Balancer.public_net.ipv6: ID of an IPv6 Primary IP to assign to the Load Balancer.If you omit a property, a new Primary IP of that version is allocated for the Load Balancer, as before.
A Primary IP can currently only be assigned when the Load Balancer is created. It stays assigned for the entire lifetime of the Load Balancer.
Related to https://docs.hetzner.cloud/changelog#2026-10-05-load-balancers-can-use-existing-primary-ips and https://docs.hetzner.cloud/changelog#2026-10-05-delete-load-balancer-returns-action.