feat: attach lb to network

This commit is contained in:
2025-12-31 12:13:02 -05:00
parent a916da7d45
commit f39b29288e
2 changed files with 8 additions and 0 deletions

View File

@@ -12,6 +12,13 @@ resource "hcloud_network_subnet" "subnet" {
ip_range = local.subnet-cidr
}
// Attach the load balancer to the compute subnet.
resource "hcloud_load_balancer_network" "attachment" {
load_balancer_id = hcloud_load_balancer.lb.id
subnet_id = hcloud_network_subnet.subnet.id
ip = local.lb-private-ip
}
// Provide internet to the private servers, by sending all internet traffic to
// the NAT.
resource "hcloud_network_route" "gateway" {