Clicking through the Proxmox UI to create a VM is fine the first time. By the fifth VM you have five slightly different machines, and you are not sure which one has your SSH key or the right disk size. This post shows the setup I use instead: a cloud-init template built once, and Terraform that creates every VM from a short list.
Everything here is in a free repository, Rackplinth Lite (MIT). It was tested on Proxmox VE 9.2 with OpenTofu 1.13 and the bpg/proxmox provider 0.122.
The plan
Build a Debian 13 template from the official cloud image, with the QEMU guest agent inside.
Give Terraform an API token.
Describe the VMs in a map and run terraform apply .
Each VM comes up with a static IP and your SSH key, and password login is off. Terraform also writes an Ansible inventory, so you can start configuring the VMs right away.
Step 1: a template you can trust
Debian publishes cloud images with SHA512 checksums.…