terraform apply -refresh-only
flags disks in r/vsphere_virtual_machine
as orphaned_disk
#2070
Open
4 tasks done
Labels
Milestone
Community Guidelines
Terraform
v1.5.7
Terraform Provider
v2.5.1
VMware vSphere
v7.0.3
Description
After recreating a VM outside of terraform (eg after a backup restore), and running a
terraform plan -refresh-only
the disks are attached asorphaned_diskX
at the VM. I would expect a sync from the remote state to the tfstate would attach the disks with labeldiskX
instead of orphaned. The current behaviour breaks subsequent runs of terraform, since it tries to remove the orphaned disks.Affected Resources or Data Sources
resource/vsphere_virtual_machine
and its disk subresourceTerraform Configuration
https://gist.github.com/rexatlanti/4cb41f24e340e5f760aa3a502e055919
Debug Output
https://gist.github.com/rexatlanti/be5cba40f192315fc7d4a4cfa04271a3
Panic Output
No response
Expected Behavior
terraform apply -refresh-only
adds remote disks asdiskX
instead oforphaned_diskX
Actual Behavior
Disks are being written into the state as
orphaned_diskX
Steps to Reproduce
terraform plan/apply -restore-only
Environment Details
No response
Screenshots
No response
References
No response
The text was updated successfully, but these errors were encountered: