Proxmox Terraform IntegrationΒΆ
You can use Terraform to automate certain tasks on Proxmox. This allows you to manage virtual machines and lxc containers with infrastructure-as-code. We're using the third-party plugin telmate/terraform-provider-proxmox.
Authenticate to ProxmoxΒΆ
Create an API Token on ProxmoxΒΆ
WIP
Add Provider config to TerraformΒΆ
WIP
TemplatesΒΆ
WIP
Useful commandsΒΆ
Import existing virtual machines to TerraformΒΆ
Existing virtual machines can be imported to the Terraform state file with the following command. Make sure, you have created a corresponding Resource in the Terraform File.
In the telmate/terraform-provider-proxmox, the id needs to be set according to <node>/<type>/<vmid>
, like in the following example.