# Server layer: creates server0 at Hetzner and installs the SSH key at boot. # Packages, swap, containerd, kubeadm, addons and Caddy follow in later steps # over SSH; see plan.md. # # Terraform does not manage anything inside the cluster beyond the bootstrap # (namespace cv, quota, addons). Workloads belong to kustomize. provider "hcloud" {} resource "hcloud_ssh_key" "cv_infra" { name = "cv-infra" public_key = file(pathexpand(var.ssh_public_key_path)) } resource "hcloud_server" "server0" { name = "server0" server_type = var.server_type image = var.server_image location = var.server_location ssh_keys = [hcloud_ssh_key.cv_infra.id] labels = { role = "cv-control-plane" } public_net { ipv4_enabled = true # No AAAA record is managed, so do not pay for an unused IPv6. ipv6_enabled = false } }