Open rovilu opened 11 months ago
This issue is stale because it has been open for 30 days with no activity and it has not the 'status: confirmed' label or it is not in a milestone. Remove the 'status: stale' label or comment, or this will be closed in 5 days.
Up
This issue is stale because it has been open for 30 days with no activity and it has not the 'status: confirmed' label or it is not in a milestone. Remove the 'status: stale' label or comment, or this will be closed in 5 days.
I think it would be better to fix this at the same time we externalize the disk resource as it's not a critical bug
Description
There is a possibility to add volatile disk to opennebula_virtual_machine resource, which shares the virtual machine's lifecycle. The documentation says that if size disk size value is changed on an existing resource, it must be bigger than the previous one.
If the new value is still smaller than the previous one, on "terraform apply", the plugin crashes producing a huge error log:
Terraform and Provider version
Terraform v1.6.2 OpenNebula provider v1.3.0
Affected resources and data sources
opennebula_virtual_machine
Terraform configuration
No response
Expected behavior
Error is raised by the plugin telling that the disk size value should be bigger than the previous one.
Actual behavior
The plugin crashes.
Steps to Reproduce
Create "opennebula_virtual_machine" resource with raw disk of a random size, e.g. using sample:
....
.... disk { size = 5120 driver = "raw" dev_prefix = "sd" volatile_type = "fs" volatile_format = "raw" } .....