Open VoidAndAny opened 3 months ago
Hi @VoidAndAny 👋🏼
Yeah, the file datasource would make it easier. But you probably don't need to define resource "proxmox_virtual_environment_file" "ubuntu_2204_vm_image"
within each VM folder either. You can use "${var.image_datastorestore_id}:iso/jammy-server-cloudimg-amd64.img"
directly as a disk.file_id
value in the VM.
Whaouh, so simple You can close this issue if you want, thanks a lot
I'll leave it, would be a useful feature.
+1, I need this feature
Not a bug, just need help to use the provider, maybe it's more terraform usage than provider help, feel free to close this issue if it's not appropriate.
In my usage, I separate each VM in directory but I want to use the same iso/vztmpl.
For now, I have a common directory with terraform configuration to download iso/vztmpl with proxmox_virtual_environment_download_file resource:
Then in each VM directories I import them like this:
I had to configure lifecycle with prevent_destroy to preserve my image if I destroy VM (so I need to destroy with
-target
option)Is there a better way (I tought use template but I prefer not) ? In my terraform comprehension this had to be done with data source, but there is no data source for file ?
Thanks for your help