Terraform and disk migrations
-
Hi all,
I have a general question about the Terraform provider.
At the moment, all my VMs are managed by Terraform, so far, so good. However, there’s one feature I’m missing. Terraform doesn’t seem to support disk migration. When I change the sr_id in the xenorchestra_vm resource, I get the following error:
Error: disk update action 'disk migration Update (Sr ID update)' not handledI’m aware that I can use "ignore_changes = [disk]", but in that case, I lose the ability to modify the disk size through Terraform.
I’m not really happy with the idea of managing my VMs partly in Terraform and partly in XO. Another possible workaround is to set "ignore_changes = all", using Terraform only to create or remove systems, and handling all other changes through XO or Ansible.
How are you handling this situation?
-
Ping @Team-DevOps
-
@carloum70 Disk migration isn't supported by the provider yet. What you can do it's only ignore the changes to the sr_id of a given disk.
For example for the first disk:
lifecycle { ignore_changes = [ disk[0].sr_id ] }You can also manually do the migration in XO and then after edit your HCL to update the sr_id with the new ID. It should do the trick.