Describe the bug
The provider doesn't deny shrinking of disks. I changed disk size from 20 GiB to 10 GiB and run tofu apply. I get back Modifications complete after 4s. Also, the instances were rebooted without any warning. If I connect to the vm, I can see that disk size is still 20GiB. If I run tofu plan, it's still trying to change disk size from 20 GiB to 10 GiB.
OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
~ update in-place
OpenTofu will perform the following actions:
# module.proxmox_staging[0].proxmox_virtual_environment_vm.server will be updated in-place
~ resource "proxmox_virtual_environment_vm" "server" {
id = "61950"
# (28 unchanged attributes hidden)
~ disk {
~ size = 20 -> 10
# (11 unchanged attributes hidden)
}
# (9 unchanged blocks hidden)
}
# module.proxmox_staging[1].proxmox_virtual_environment_vm.server will be updated in-place
~ resource "proxmox_virtual_environment_vm" "server" {
id = "61951"
# (28 unchanged attributes hidden)
~ disk {
~ size = 20 -> 10
# (11 unchanged attributes hidden)
}
# (9 unchanged blocks hidden)
}
Plan: 0 to add, 2 to change, 0 to destroy.
Do you want to perform these actions?
OpenTofu will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
module.proxmox_staging[1].proxmox_virtual_environment_vm.server: Modifying... [id=61951]
module.proxmox_staging[0].proxmox_virtual_environment_vm.server: Modifying... [id=61950]
module.proxmox_staging[0].proxmox_virtual_environment_vm.server: Modifications complete after 4s [id=61950]
module.proxmox_staging[1].proxmox_virtual_environment_vm.server: Modifications complete after 4s [id=61951]
Expected behavior
Disk shall be shrinked or shrinking of disks shall be denied if not possible.
Proxmox version: Virtual Environment 8.2.2
Provider version (ideally it should be the latest version): v0.65.0
Terraform/OpenTofu version: OpenTofu v1.8.2 on darwin_arm64
OS (where you run Terraform/OpenTofu from): Mac OS X
Describe the bug The provider doesn't deny shrinking of disks. I changed disk size from 20 GiB to 10 GiB and run
tofu apply
. I get backModifications complete after 4s
. Also, the instances were rebooted without any warning. If I connect to the vm, I can see that disk size is still 20GiB. If I run tofu plan, it's still trying to change disk size from 20 GiB to 10 GiB.Expected behavior Disk shall be shrinked or shrinking of disks shall be denied if not possible.
Virtual Environment 8.2.2
v0.65.0
OpenTofu v1.8.2 on darwin_arm64
Mac OS X
TF_LOG=DEBUG terraform apply
):