And work it should…
A while ago we typed up a detailed article about using Terraform to provision VMs on proxmox nodes, you can find it here.
That article was dependant on some versions that are no longer supported and can and will cause problems eventually.
So we updated the dependencies, versions and did some definition refactoring in order to allow the process to work with the latest versions at the time of writing this article.
Current versions:
- Terraform 1.0
- Proxmox 6.4
Hooray Terraform Registry!
The Terraform Registry finally has Telmate’s Proxmox provisioner hosted on its platform so we can define it on the .tf
file and forget about it.
You can find the module here: Telmate’s Proxmox Module
This allows us to happily say you no longer need to worry about installing the module manually and working out the kinks on Go’s installation methods.
Terraform Definitions
There are some changes that need to be made to the old main.tf
definition file, the first one is:
terraform {
required_providers {
proxmox = {
source = "Telmate/proxmox"
version = "2.7.1"
}
}
}
Afterwards, we need change some other entries that are no longer supported:
Disk definitions
These definitions no longer apply as they are properly detected by the module:
id = 0
storage_type = "lvm"
iothread = true
Network definitions
The same happens to some of the network definitions:
id = 0
Github repo
We’ve uploaded the updates to Github with the updates you can also check out the commit history to see the changes yourself:
https://github.com/galdorork/tf-Proxmox
Also, we’ve updated the docker image we’ve use to run pipelines that need Terraform and (maybe) Terragrunt (wink, wink):
https://github.com/galdorork/terragrunt-proxmox-module
We’ll try to keep updating old posts to work on newer versions, but this one really needed some love.
BAIIII :)