Skip to content

Creating and maintaining Proxmox VMs with Terraform

Creating and maintaining new VMs on [[Proxmox]] with [[Terraform]] can be done with the following [[Github]] repository: https://github.com/davosian/siebensprung-proxmox-terraform

Nomad Cluster

The following standard Terraform commands create a 3 node [[Nomad]] cluster:

# go to the correct directory
cd nomad/

# invoke terraform
terraform init
terraform plan
terraform apply

To provision the server, check out the repository https://github.com/davosian/siebensprung-proxmox-nomad. This one does some basic server setup and installs Nomad using [[Ansible]].

Prerequisites:

.ssh/config to include the devkey:

Host *
  AddKeysToAgent yes
  IdentityFile /home/davosian/.ssh/devkey

ssh-agent running:

ssh-agent -k
eval "$(ssh-agent)"

Run the base setup as follows:

task ansible_play
task run_on_nomad -- nomad -v

Resources