You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow to attach/detach disks to a running/poweroff VM.
The implementation take the decision based on the comparison of the image_id argument between the new disks configured, and the disks in the terraform state.
Operations are done in this order:
If an image_id is found in the state, but not in the new config, it's considered as attached, thus, the disk will be detached based on the disk_id attribute (which is the disk number)
If an image_id is find in the new config, but not in state, this image ID will be attached
Between each operations, wait on the state to be back on Running/poweroff again, and check disk presence (attach method is async)
These are the states from which it's possible to call attach/detach actions.
So, by the way I updated and refactored the method to wait on VM state, and for consistency, the method to wait on image state.
Allow to attach/detach disks to a running/poweroff VM.
The implementation take the decision based on the comparison of the image_id argument between the new disks configured, and the disks in the terraform state.
Operations are done in this order:
image_id
is found in the state, but not in the new config, it's considered as attached, thus, the disk will be detached based on thedisk_id
attribute (which is the disk number)image_id
is find in the new config, but not in state, this image ID will be attachedBetween each operations, wait on the state to be back on Running/poweroff again, and check disk presence (attach method is async)
These are the states from which it's possible to call attach/detach actions.
So, by the way I updated and refactored the method to wait on VM state, and for consistency, the method to wait on image state.
PR: #59
Feel free to drop a comment if you see some problem with this behavior
The text was updated successfully, but these errors were encountered: