Example: hetzner-wan-mesh0
terraform/examples/hetzner-wan-mesh0 has no private network. The nodes
talk over their public addresses through mesh0, the kernel WireGuard plane
on UDP 4244. This is the shape of a cluster spread across places that share
no network.
What differs from hetzner-lan
Section titled “What differs from hetzner-lan”networking = { private = false }creates no network, andnic_namenames the public interface,eth0on Hetzner’s Debian images.- With a public plane,
firewall.inter_nodederives toplane: one firewall admits only the cluster plane’s ports, from the cluster’s own node addresses. The example opens UDP 4244 to everyone on top, for mesh0. topology.kind = "wan"says so to the platform; it creates no further resource.
networking = { private = false } nic_name = var.public_nic
firewall = { public_ports = [{ port = "4244", protocol = "udp" }] }
topology = { kind = "wan" }Running it
Section titled “Running it”As hetzner-lan, with the same key, the same two environment values and the
same licence.
cluster_name = "wan"shc_version = "0.1.3"server_type = "cx23"ssh_private_key_path = "~/.ssh/learn"license_token_path = "~/shc-license.token"$ tofu -chdir=learn/shc/terraform/examples/hetzner-wan-mesh0 init...OpenTofu has been successfully initialized!...$ tofu -chdir=learn/shc/terraform/examples/hetzner-wan-mesh0 plan...$ tofu -chdir=learn/shc/terraform/examples/hetzner-wan-mesh0 apply -auto-approve...$ tofu -chdir=learn/shc/terraform/examples/hetzner-wan-mesh0 output node_names[ "nodes01.wan", "nodes02.wan", "nodes03.wan",]The consent, applied, then the destroy.
cluster_name = "wan"shc_version = "0.1.3"server_type = "cx23"ssh_private_key_path = "~/.ssh/learn"license_token_path = "~/shc-license.token"on_destroy = "force"$ tofu -chdir=learn/shc/terraform/examples/hetzner-wan-mesh0 apply -auto-approve...$ tofu -chdir=learn/shc/terraform/examples/hetzner-wan-mesh0 destroy -auto-approve...shc@docs:~$