Terraform module which creates Proxmox Cloud-Init VMs. Supports Ansible groups using https://github.com/xezpeleta/Ansible-Proxmox-inventory .
Proxmox VM Template Requirements
The Proxmox VM template must be cloud-init enabled and have qemu-guest-agent
installed.
qemu-guest-agent
can be added to an existing cloud image using create_template.sh .
Name
Version
terraform
~> 1.0
proxmox
~> 2.6.5
Name
Version
proxmox
~> 2.6.5
No Modules.
Name
Description
Type
Default
Required
ansible_groups
List of ansible groups to assign to the VM. Stored as JSON in the Notes field in Proxmox.
list(string)
[]
no
cipassword
Override the default cloud-init user's password
string
null
no
ciuser
Override the default cloud-init user for provisioning
string
n/a
yes
clone
The base VM from which to clone to create the new VM
string
n/a
yes
connection
Provisioner connection settings
map(string)
{ "agent": true, "type": "ssh" }
no
cores
The number of CPU cores per CPU socket to allocate to the VM
number
1
no
disks
VM disk config
list(map(string))
[ {} ]
no
ipconfig0
The first IP address to assign to the guest. Format: [gw=] [,gw6=] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>]
string
"ip=dhcp"
no
ipconfig1
The second IP address to assign to the guest. Same format as ipconfig0
string
null
no
ipconfig2
The third IP address to assign to the guest. Same format as ipconfig0
string
null
no
memory
The amount of memory to allocate to the VM in Megabytes
number
512
no
name
The name of the VM within Proxmox
string
n/a
yes
nameserver
Sets default DNS server for guest
string
null
no
networks
VM network adapter config
list(map(string))
[ {} ]
no
numa
Whether to enable Non-Uniform Memory Access in the guest
bool
false
no
pool
The destination resource pool for the new VM
string
null
no
searchdomain
Sets default DNS search domain suffix
string
null
no
sockets
The number of CPU sockets to allocate to the VM
number
1
no
sshkeys
Newline delimited list of SSH public keys to add to authorized keys file for the cloud-init user
string
n/a
yes
tags
Map of tags to add to the VM. Stored as JSON in the Notes field in Proxmox.
map(string)
{}
no
target_node
The name of the Proxmox Node on which to place the VM
string
"pve"
no
Name
Description
groups
The Ansible groups assigned to the VM
hostname
The hostname of the VM
ip
The IP address of the VM
username
The username of the VM
vmid
The ID of the VM in Proxmox