This is a reopening of #1858
Is your feature request related to a problem? Please describe:
I'm running into a case right now where I'm deploying VMs in Kubevirt using Terraform. I create a PVC using a DV that clones a PV that has the Ubuntu cloud image https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img, attach the DV to a VMI and go.
But then I'm in a catch 22 if I want to resize, I can't modify the size of the PVC with Terraform. I can't create the PVC with a TF resource because TF expects to create the resource. I can get the PVC using a TF datasource but those are only for data I can't use them to change the resource.
Describe the solution you'd like:
I understand that DataVolumes are supposed to be just a creation device and aren't supposed to be modified post deployment. The problem is in some situations they don't work like that. Such as in the case above. It would be optimal if at least the size could be changed.
Describe alternatives you've considered:
Because of how Terraform works I can't really do like what Harvester did and create a new DV cloned from the original DV's PVC and then attach that to the VM/VMI. It creates a circular dependency
Additional context:
We are using Coder to deploy VM workspaces in Kubevirt so we have to use TF to manage the deploys
So after further digging I think my needs can be met with the datasource reference. I can use a DV to import my image then use the PVC from that as a datasource for PVCs for the Kubevirt images.
This is a reopening of #1858 Is your feature request related to a problem? Please describe: I'm running into a case right now where I'm deploying VMs in Kubevirt using Terraform. I create a PVC using a DV that clones a PV that has the Ubuntu cloud image https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img, attach the DV to a VMI and go.
But then I'm in a catch 22 if I want to resize, I can't modify the size of the PVC with Terraform. I can't create the PVC with a TF resource because TF expects to create the resource. I can get the PVC using a TF datasource but those are only for data I can't use them to change the resource.
Describe the solution you'd like: I understand that DataVolumes are supposed to be just a creation device and aren't supposed to be modified post deployment. The problem is in some situations they don't work like that. Such as in the case above. It would be optimal if at least the size could be changed.
Describe alternatives you've considered: Because of how Terraform works I can't really do like what Harvester did and create a new DV cloned from the original DV's PVC and then attach that to the VM/VMI. It creates a circular dependency
Additional context: We are using Coder to deploy VM workspaces in Kubevirt so we have to use TF to manage the deploys