vatesfr / terraform-provider-xenorchestra

Xen Orchestra provider for Terraform
MIT License
149 stars 33 forks source link

Ensure that `xenorchestra_vm` resource state is migrated properly provider upgrade (v0.25.0) #271

Closed ddelnano closed 8 months ago

ddelnano commented 8 months ago

Summary: Ensure that xenorchestra_vm resource state is migrated properly provider upgrade (v0.25.0)

This PR addresses #267 by adding a state migration for the xenorchestra_vm's destroy_cloud_config_vdi_after_boot argument. Since this argument is marked as ForceNew, it would inadvertently think that VM resources created with earlier versions should be deleted and recreated. This change ensures that the value is set to the default upon upgrade and verifies that migration with a terraform acceptance test.

Testing done: Jenkins passes and new test fails without V1 state migration