test: try doing the lb separately

This commit is contained in:
2026-01-01 15:59:48 -05:00
parent 4768c94b24
commit b04298adfb
8 changed files with 101 additions and 91 deletions

View File

@@ -51,3 +51,18 @@ resource "hcloud_server" "server" {
depends_on = [hcloud_network_subnet.subnet]
}
resource "hcloud_load_balancer" "lb" {
name = "lb-hetzner"
load_balancer_type = "lb11"
network_zone = "eu-central"
}
resource "hcloud_load_balancer_target" "load_balancer_target" {
for_each = hcloud_server.server
type = "server"
load_balancer_id = hcloud_load_balancer.lb.id
use_private_ip = true
server_id = each.value.id
}