-
Notifications
You must be signed in to change notification settings - Fork 486
Description
System Information
Linux distribution
Ubuntu 20.04/22.04
Terraform version
Terraform v1.0.11 on linux_amd64
Provider and libvirt versions
terraform-provider-libvirt 0.6.14
Checklist
-
Is your issue/contribution related with enabling some setting/option exposed by libvirt that the plugin does not yet support, or requires changing/extending the provider terraform schema?
- Make sure you explain why this option is important to you, why it should be important to everyone. Describe your use-case with detail and provide examples where possible.
- If it is a very special case, consider using the XSLT support in the provider to tweak the definition instead of opening an issue
- Maintainers do not have expertise in every libvirt setting, so please, describe the feature and how it is used. Link to the appropriate documentation
-
Is it a bug or something that does not work as expected? Please make sure you fill the version information below:
Description of Issue/Question
Terraform can detect state differences between an existing volume size and an expected new volume size but with the current libvirt provider, volumes are first deleted then re-created with the new size.
This is ok for reproductible and immutable environments but this is annying especially when you have big volumes or data you would like to avoid losing or restoring (repository mirroring, datasets, ...).
Libvirt enable resizing a volume without destrying/re-creating it, I can do it easily with virsh just like this :
virsh vol-resize <MyVolume> <NewSizeInBytes> --pool <MyVolumePool>
Only conditions for that :
- VM must be stopped
- new volume size can't be smaller than original size (can only expand, not shrink)
Steps to Reproduce Issue
Any VM with at least a volume