Files
werewulf/hpcod/terraform/envs/lab/terraform.tfvars.example
ilkerandClaude Opus 5.5 3be70e9b63 provision: a cluster contract that names no backend
TFVars wrote vmid_base and hostpci, which only the Proxmox environment
understands. A second backend would have had to declare and ignore them.

The variables the runner writes are now listed in provision.Contract and
say what the cluster is, not how Proxmox builds it: devices replaces
hostpci, and the Proxmox environment derives vmid_base from cluster_id
itself (still overridable, which `hpcod provision -vmid-base` now does).

A test holds every terraform/envs/*/variables.tf to the contract and
TFVars to nothing outside it.

Checked by planning the Proxmox environment offline for the same cluster
before and after: the planned resources and outputs are byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 10:02:59 +01:00

30 lines
908 B
Plaintext

# Copy to terraform.tfvars and fill in. The real file is gitignored.
pve_endpoint = "https://10.0.0.10:8006"
pve_token = "hpcod-tf@pve!terraform=<uuid>"
pve_insecure = true
pve_ssh_user = "root"
node_name = "hv01"
image_file_id = "local:import/Rocky-9-GenericCloud-Base.latest.x86_64.qcow2"
datastore_id = "zfspool"
# One cluster. A tenant running a second one at the same time needs a
# second cluster_id: the bridge, subnet and MACs all come from it.
cluster_id = 1
tenant_id = 1
tenant_name = "demo"
# VMIDs default to 9000 + 10*cluster_id; set vmid_base only to override.
# vmid_base = 9001
mgmt_bridge = "vmbr0"
mgmt_ip_cidr = "10.0.0.60/24"
mgmt_gateway = "10.0.0.1"
head = { cores = 2, memory_gb = 4, disk_gb = 40 }
compute = { count = 2, cores = 2, memory_gb = 6 } # allocated, incl. rootfs reserve
ci_user = "hpcod"
ssh_public_keys = ["ssh-ed25519 AAAA... you@host"]