OpenTofu modules for Proxmox VM provisioning with cloud-init.
This repo provides two things:
-
Reusable modules -
proxmox-vm,proxmox-file,proxmox-sdncan be used standalone by anyone doing Proxmox + OpenTofu work -
homestak integration -
envs/genericis the execution layer for iac-driver workflows
Part of the homestak-dev organization.
Use iac-driver for manifest-driven VM provisioning:
# Install homestak
curl -fsSL https://raw.githubusercontent.com/homestak-dev/bootstrap/master/install.sh | sudo bash
# Switch to homestak user, deploy and test a VM
sudo -iu homestak
cd ~/lib/iac-driver
./run.sh manifest test -M n1-push -H <nodename>Use modules directly in your own OpenTofu configuration:
module "vm" {
source = "github.com/homestak-dev/tofu//proxmox-vm"
proxmox_node_name = "pve"
vm_name = "my-vm"
cloud_image_id = "local:iso/debian-12.img"
cloud_init_user_data = file("cloud-init.yaml")
vm_cpu_cores = 2
vm_memory = 4096
vm_disk_size = 20
}Requires manually crafted tfvars.json matching iac-driver schema:
cd envs/generic
tofu init
tofu plan -var-file=/path/to/tfvars.json
tofu apply -var-file=/path/to/tfvars.jsontofu/
├── proxmox-vm/ # Reusable: VM provisioning with cloud-init
├── proxmox-file/ # Reusable: cloud image management
├── proxmox-sdn/ # Reusable: VXLAN SDN networking
└── envs/
└── generic/ # homestak: receives config from iac-driver
| Module | Purpose |
|---|---|
proxmox-vm |
Single VM with CPU, memory, disk, network, cloud-init |
proxmox-file |
Cloud image management (local or URL source) |
proxmox-sdn |
VXLAN zone, vnet, and subnet configuration |
- OpenTofu CLI
- Proxmox VE with API access
- SSH key at
~/.ssh/id_rsa
For full homestak integration:
- bootstrap installed
- site-config set up and decrypted
See CLAUDE.md for detailed architecture, configuration flow, and known issues.
| Dependency | Purpose | License |
|---|---|---|
| bpg/proxmox | OpenTofu provider for Proxmox API | MPL-2.0 |
| Repo | Purpose |
|---|---|
| bootstrap | Entry point - curl|bash setup |
| site-config | Site-specific secrets and configuration |
| ansible | Proxmox host configuration |
| iac-driver | Orchestration engine |
| packer | Custom Debian cloud images |
Apache 2.0 - see LICENSE