Introduce opennebula_virtual_machine_disk_attachment
to prevent issues when replacing image
#525
Milestone
opennebula_virtual_machine_disk_attachment
to prevent issues when replacing image
#525
Description
The issue:
Currently, an image is attached to a VM via an attribute (
disk
).It's fine until we need to replace the image (for example in order to upgrade the the OS).
In this case, the provider is not able to detach the disk by itself since a disk is an attribute.
A solution:
To fix this, a disk attachment should be an attribute:
Let's imagine a new resource called
opennebula_virtual_machine_disk_attachment
. It as (at least) 2 attributes: the image ID and the VM id. If one of both attributes changes, the disk attachment is forced recreated.That means, if I change the image, its ID changes, so the attachement is recreated.
Another way would be to destroy-recreate the entire VM (but I'm quite sure this is not what we want here... 🤷🏻♂️).
New or affected resources and data sources
opennebula_virtual_machine
(r+d): Deprecatedisk
attributeOpenNebula_virtual_machine_disk_attachment
(r+d)Potential terraform configuration
References
No response
The text was updated successfully, but these errors were encountered: