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]: Load balancers should honor selected subnet. #844

Open
mzhaase opened this issue Jan 18, 2024 · 1 comment
Open

[Feature]: Load balancers should honor selected subnet. #844

mzhaase opened this issue Jan 18, 2024 · 1 comment

Comments

@mzhaase
Copy link

mzhaase commented Jan 18, 2024

What whould you like to see?

Im creating two hcloud load balancers:

# module.kubernetes-cluster.hcloud_load_balancer_network.control-plane will be created
  + resource "hcloud_load_balancer_network" "control-plane" {
      + enable_public_interface = false
      + id                      = (known after apply)
      + ip                      = (known after apply)
      + load_balancer_id        = (known after apply)
      + subnet_id               = "xxx-10.0.128.0/19"
    }

  # module.kubernetes-cluster.hcloud_load_balancer_network.worker will be created
  + resource "hcloud_load_balancer_network" "worker" {
      + enable_public_interface = true
      + id                      = (known after apply)                                                                                                                                                                                                                                                                              + ip                      = (known after apply)
      + load_balancer_id        = (known after apply)
      + subnet_id               = "xxx-10.0.128.0/19"
    }

Expectation: IPs of load balancers are within 10.0.128.0/19. They should be assigned this subnet.

Reality: Load balancers have random, non-deterministic IPs from any subnet. They are not necessarily assigned to the correct subnet.

Impact: Proper firewalling not possible.

@apricote
Copy link
Member

Hey @mzhaase,

this is not supported in our API, the subnet_id field is basically just a workaround to get the dependency order correct in Terraform. If you want to assign the Load Balancer to the subnet, you will have to manually set an IP from the range.

At the core, this is the same issue as explained in #672.

I am going to keep this issue open for tracking the same problem with Load Balancers.

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