terraform-provider-proxmox: Disk resize for VM not updated in terraform state
Describe the bug After increasing the disk size in Terraform, the state still contains the old values and tries to increase again.
To Reproduce Steps to reproduce the behavior:
- Create a VM resource
- Increase disk size by any amount
- terraform apply
- once complete, run terraform plan
Expected behavior Terraform’s state should have the new value after applying.
Log
# Original Apply
Terraform will perform the following actions:
# proxmox_virtual_environment_vm.vms["web"] will be updated in-place
~ resource "proxmox_virtual_environment_vm" "vms" {
id = "100"
name = "web"
+ protection = false
# (26 unchanged attributes hidden)
~ disk {
~ size = 50 -> 100
# (11 unchanged attributes hidden)
}
# (8 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
proxmox_virtual_environment_vm.vms["web"]: Modifying... [id=100]
proxmox_virtual_environment_vm.vms["web"]: Still modifying... [id=100, 10s elapsed]
proxmox_virtual_environment_vm.vms["web"]: Still modifying... [id=100, 20s elapsed]
proxmox_virtual_environment_vm.vms["web"]: Still modifying... [id=100, 30s elapsed]
proxmox_virtual_environment_vm.vms["web"]: Still modifying... [id=100, 40s elapsed]
proxmox_virtual_environment_vm.vms["web"]: Still modifying... [id=100, 50s elapsed]
proxmox_virtual_environment_vm.vms["web"]: Still modifying... [id=100, 1m0s elapsed]
proxmox_virtual_environment_vm.vms["web"]: Still modifying... [id=100, 1m10s elapsed]
proxmox_virtual_environment_vm.vms["web"]: Still modifying... [id=100, 1m20s elapsed]
proxmox_virtual_environment_vm.vms["web"]: Still modifying... [id=100, 1m30s elapsed]
proxmox_virtual_environment_vm.vms["web"]: Modifications complete after 1m34s [id=100]
# terraform plan
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
~ update in-place
# proxmox_virtual_environment_vm.vms["web"] will be updated in-place
~ resource "proxmox_virtual_environment_vm" "vms" {
id = "100"
name = "web"
# (27 unchanged attributes hidden)
~ disk {
~ size = 50 -> 100
# (11 unchanged attributes hidden)
}
# (8 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
- Single or clustered Proxmox: Single
- Proxmox version: 8.x
- Provider version (ideally it should be the latest version): latest (v0.55.1)
- Terraform/OpenTofu version: Terraform 1.5.7
- OS (where you run Terraform/OpenTofu from): Ubuntu 22.04 LTS
Let me know if I can provide any more information that would be useful.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (5 by maintainers)
I did restart it a moment ago, because it was having some errors for
guest pingin the logs, but they weren’t recent.And after the restart, a
terraform planstill shows that it wants to change the disk.