- git clone ..
- cd repo
- cp secret.tfvars.example secret.tfvars
- fill all required fields in the secret.tfvars with your settings
- terraform init
- terraform plan -var-file="secret.tfvars"
- terraform apply -var-file="secret.tfvars"
- PROFIT!!!
Important notes
- Check documentation to proxmox module - it contains important information how to prepare API user (issues with permissions)
- Check variables.tf - it contains my nodes definition, but you need feel it with yourself nodenames.
- Template name - quite important - as i don't have shared storage in my testing Proxmox environment , i had to prepare same templates on all nodes.
Just for remember:
- wget https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-amd64.img
- qm create 9002 --name ubuntu-2004-cloud-init --numa 0 --ostype l26 --cpu cputype=host --cores 2 --sockets 1 --memory 2048 --net0 virtio,bridge=vmbr0
- qm importdisk 9002 /tmp/ubuntu-20.04-server-cloudimg-amd64.img DATA
- qm set 9002 --scsihw virtio-scsi-pci --scsi0 DATA:9002/vm-9002-disk-0.raw
- qm set 9002 --ide2 DATA:cloudinit
- qm set 9002 --boot c --bootdisk scsi0
- qm set 9002 --serial0 socket --vga serial0
- qm set 9002 --agent enabled=1
- .. prepare you virtual machine , and then create template
- qm template 9002