Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Allow Assigning Public Floating IPs to Load Balancers while also letting them join private networks. #867

Open
sharkymcdongles opened this issue Feb 8, 2024 · 2 comments

Comments

@sharkymcdongles
Copy link

What whould you like to see?

I am trying to attach a load balancer to a private network for my k3s cluster. I can do this fine using network_id. I cannot do this if I specify my floating IP though because the private network doesn't contain my floating IP.

I also cannot get subnet_ids anyway I have tried to.

@apricote
Copy link
Member

Hey @sharkymcdongles,

I am trying to attach a load balancer to a private network for my k3s cluster. I can do this fine using network_id. I cannot do this if I specify my floating IP though because the private network doesn't contain my floating IP.

It is not possible to specify a Floating IP as a target for the Load Balancer. You will get an error cannot add IP to load balancer: IP belongs to Hetzner Cloud resource (cloud_resource_ip_not_allowed). Only IPs from Robot Servers are supported for this. To add a server you need to use type = "server" and server_id = .... Floating IPs are also always a publicly routed IP, there is no way to access the Floating IP through the private network.

Perhaps I am misunderstanding what you are trying to do. Could you explain it a bit more and post some example terraform code for me to check against?

I also cannot get subnet_ids anyway I have tried to.

The subnet_id is faked inside the terraform-provider-hcloud to help terraform get the right dependency order. You can get it from the hcloud_network_subnet resource. Note that its not possible to force the subnet from which an IP is taken when assigning Load Balancers or Servers to the Network. You will need to manually manage the IPs if you want an IP from a specific subnet.

Copy link

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

@github-actions github-actions bot added the stale label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants