add a disk on a exists vm will recreate this VM #2233
Labels
acknowledged
Status: Issue or Pull Request Acknowledged
area/vm
Area: Virtual Machines
bug
Type: Bug
needs-triage
Status: Issue Needs Triage
waiting-response
Status: Waiting on a Response
Milestone
Community Guidelines
Terraform
1.7.1
Terraform Provider
2.6.1
VMware vSphere
7.0.3
Description
I modified main.tf and tried to add a disk to an existing VM. Terraform apply will recreate my VM, which will cause data loss. Is there any way to avoid the re-creation?
Affected Resources or Data Sources
resource/vsphere_virtual_machine
Terraform Configuration
1銆乧reate vsphere vm from template with only one disk first
2銆乤dd another disk to the vsphere_virtual_machine resource
Debug Output
vsphere_virtual_machine.vm锛欴estroying... [id=422de896-1dbe-6669-d019-fa8e69afd15f]
Panic Output
No response
Expected Behavior
when I add a new disk to an existing VM, I want to avoid recreating the VM after executing terraform apply.
Actual Behavior
add new disk will recreate VM
Steps to Reproduce
1銆乽se terraform create an VM with only one disk instance
2銆乽se terraform create an disk
3銆丮odify the main.tf file of the virtual machine and bind the disk created in the second step to the virtual machine
4銆乤pply this VM will destroy and recreate this VM
Environment Details
No response
Screenshots
No response
References
#434
The text was updated successfully, but these errors were encountered: