Example: hetzner-lan-lb
terraform/examples/hetzner-lan-lb is hetzner-lan with the SHC-managed
edge on top: one Hetzner connection drives DNS, the load balancer and block
volumes, all through the module’s topology block.
What differs from hetzner-lan
Section titled “What differs from hetzner-lan”- The public firewall opens 80, 443 and the node port range, because the load balancer and its health checks reach the nodes directly.
bootstrap.acmeseeds Let’s Encrypt andbootstrap.hostnames the cluster’s public host.topology.kind = "lb"withdns.type = "hetzner".credentialscarries the token and the location;volume_providerandvolume_secretsmake Hetzner volumes the cluster’s storage backend.
firewall = { public_ports = [ { port = "80", protocol = "tcp" }, { port = "443", protocol = "tcp" }, { port = "30000-32767", protocol = "tcp" }, { port = "30000-32767", protocol = "udp" }, ] }
topology = { kind = "lb" dns = { name = "hetzner" type = "hetzner" zones = [var.dns_zone] credentials = { token = var.hcloud_token, location = var.region } } volume_provider = { provider = "hcloud" config = { location = var.region } } volume_secrets = { token = var.hcloud_token } }Running it
Section titled “Running it”As hetzner-lan, plus TF_VAR_hcloud_token (the same token) and, in the
tfvars, dns_zone, shc_host and acme_email.
cp learn/shc/terraform/examples/hetzner-lan-lb/terraform.tfvars.example learn/shc/terraform/examples/hetzner-lan-lb/terraform.tfvarstofu -chdir=learn/shc/terraform/examples/hetzner-lan-lb inittofu -chdir=learn/shc/terraform/examples/hetzner-lan-lb applytofu -chdir=learn/shc/terraform/examples/hetzner-lan-lb destroyThis page was not walked: the lb topology needs a DNS zone at Hetzner, and
the learning project has none.
Next: Example: hetzner-wan-mesh0.
shc@docs:~$