Describe the bug
When creating a container with a volume mount, the provider code defaults the backup option to true, and omits it from the API call to Proxmox.
"By default additional mount points besides the Root Disk mount point are not included in backups. For volume mount points you can set the Backup option to include the mount point in the backup. Device and bind mounts are never backed up as their content is managed outside the Proxmox VE storage library."
To Reproduce
Steps to reproduce the behaviour:
Create a resource of type proxmox_virtual_environment_container, specifying with a volume mount, and backup = true set.
Apply the terraform, then look in Proxmox and not that the volume mount does not have backup=1 specified.
Destroy the resource and create again, with backup = false
Apply the terraform, in Proxmox the volume mount now says backup=0.
Change backup = false to backup = true.
Apply the terraform, in Proxmox the volume mount now says backup=1, along various other options set.
Please also provide a minimal Terraform configuration that reproduces the issue.
Expected behavior
When creating a new proxmox_virtual_environment_container resource, with a volume mount and backup=true (or absent), volume mounted in the container should have backup=1 set.
When modifying an existing resource, changing the state of backup=false to backup=true and applying the TF the expected backup=1 appears. Subsequent switch of backup is also correct, it's just the initial creation that doesn't appear correct.
If you agree with my understanding of the expected behaviour then I'm happy to look at a PR to fix.
Screenshots
See above.
Additional context
Add any other context about the problem here.
Clustered Proxmox:
Proxmox version: 8.2.2
Provider version 0.57.1
Terraform version: 1.8.3
OS (where you run Terraform/OpenTofu from): MacOS 14.5
Describe the bug When creating a container with a volume mount, the provider code defaults the backup option to true, and omits it from the API call to Proxmox.
Proxmox's docs say:
"By default additional mount points besides the Root Disk mount point are not included in backups. For volume mount points you can set the Backup option to include the mount point in the backup. Device and bind mounts are never backed up as their content is managed outside the Proxmox VE storage library."
To Reproduce Steps to reproduce the behaviour:
Create a resource of type proxmox_virtual_environment_container, specifying with a volume mount, and backup = true set.
Apply the terraform, then look in Proxmox and not that the volume mount does not have backup=1 specified.
Destroy the resource and create again, with
backup = false
Apply the terraform, in Proxmox the volume mount now says backup=0.
Change
backup = false
tobackup = true
.Apply the terraform, in Proxmox the volume mount now says backup=1, along various other options set.
Please also provide a minimal Terraform configuration that reproduces the issue.
Expected behavior When creating a new proxmox_virtual_environment_container resource, with a volume mount and
backup=true
(or absent), volume mounted in the container should have backup=1 set.When modifying an existing resource, changing the state of
backup=false
tobackup=true
and applying the TF the expected backup=1 appears. Subsequent switch ofbackup
is also correct, it's just the initial creation that doesn't appear correct.If you agree with my understanding of the expected behaviour then I'm happy to look at a PR to fix.
Screenshots See above.
Additional context Add any other context about the problem here.