Configure Proxmox hosts, virtual machines, and containers
Terraform handles:
- The configuration of Proxmox hosts.
- The provisioning of Proxmox virtual machines (VMs) and LXC containers.
Terraform stages
To configure Proxmox hosts, you use the following Terraform stages:
000-initialize: initial Terraform environment setup200-proxmox: Proxmox bootstrap, including user identities and API tokens
Initialize Proxmox hosts (200-terraform stage)
After provisioning a Proxmox host, you initialize it with Terraform. The initialization process creates users, roles, and API tokens for the following stages, and persists API tokens in Terraform variables files.
You run this stage when you need to:
- Initialize a Proxmox host for the first time
- Create new Proxmox users
- Grant new permissions to existing Proxmox users
From your Linux shell, after setting the working directory to the root of this repository:
-
Open the
operationsNix shell, if needed:nix develop ./config/nix#operations -
Apply changes with Terraform:
scripts/run-terraform.shTo enable the configuration of the Proxmox IAM, create the following files: -
config/terraform/environments/proxmox-pve1-root-secrets.tfvarsto store the root credentials (password or API token) of thepve1host root password.