terraform-provider-proxmox: [3.0.1-rc1] Proxmox 8.1.4 Cloud init not working
When provisioning a virtual machine (VM) using the Telmate Terraform plugin for Proxmox, with a base on a pre-configured cloud-init template, the resulting VM loses all its configuration settings, such as boot disk, RAM, and core allocations.
Environment Details Proxmox version: 8.1.4 Telmate Terraform plugin version: 3.0.1-rc1 Terraform version: v1.7.1 on linux_amd64 Cloud-init template settings taken from Proxmox Documentation
terraform {
required_providers {
proxmox = {
source = "Telmate/proxmox"
version = "3.0.1-rc1"
}
}
}
provider "proxmox" {
# Configuration options
pm_api_url = "https://127.0.0.1:8006/api2/json"
}
resource "proxmox_vm_qemu" "test" {
name = "test"
target_node = "pve"
clone = "focal64"
}
The resource example is take from plugin documentation
Another strange behaviour is that as soon as start all works
After some times all configuration disappear
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (2 by maintainers)
Commits related to this issue
- docs: corrected documentation to address issue #935 — committed to hestiahacker/terraform-provider-proxmox by deleted user 3 years ago
Thank you very much for this, I’ve been looking everywhere for this answer… Everything clicked in place with this setting. For future reference and to facilitate google searches, here are the keywords I’ve been typing the past day :
And here is my Terraform config :
And for completness’ sake, here is how I create my template
I’ve had the same problem - here’s what I did to fix it
terraform destroyand to confirm that the agent is installedcicustomcloudinit_cdrom_storageaslocal-lvmAfter doing all of this, my Terraform applies now work
To whoever is on the latest terraform provider, cloudinit_cdrom_storage has been deprecated
https://github.com/Telmate/terraform-provider-proxmox/pull/1008/files
use disks/ide/ide3/cloudinit instead
Does anyone have been able to deploy a VM successfully using Packer (create template with cloud-init enabled) + v3.0.1-rc[12] + Proxmox v8.1.4? In case you did it, would you mind to share the config files and the steps? I’ve been working on this for a few days now but so far no luck… I can boot the VM but the cloud-init is not applied (not even the ip address indicated by
I haven’t tried @leogout’s solution yet (I need to create my image with Packer)
@USBAkimbo you are referring to this https://github.com/Telmate/terraform-provider-proxmox/pull/937 ? I hope this will help as it removes that damn ISO which is so useless.