feat(terraform): create hetzner server and apex A record

This commit is contained in:
Noel Sabia committed 2026-10-27 14:30:59 +01:00
1 parent 3335482efc
commit 8e0c1a8796
6 files changed
+96 -26

No files matched your search

+25 -3
View File
@@ -1,6 +1,28 @@
# Server layer: packages, swap, containerd, kubeadm control plane, Calico,
# metrics-server, local-path provisioner, and Caddy.
# 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.
# See OKF_CV_Website/architecture/terraform.md.
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
}
}