Hello All,
I have created a VM in vSphere thru terraform code and all looks good. I am testing a scenario of adding a disk outside of terraform (added a disk to VM from vSphere console)
When I run a plan, its detecting adrift and suggesting a deletion of disk saying “orphaned_disk_0” . I have expected this.
Now I have update my respective terraform VM code block and included it with respective attributes as below
“disk3” = {
size_gb = 50,
unit_number = 3
}
Running the plan is still suggesting to delete the 3rd disk added in vSphere and create this as new disk.
As per the terraform documentation, orphaned_disk_ prefix is used to label the disks not managed by terraform.
So if this situation happen, what would be the ideal way to include this into my terraform code (and into state) so that I will not face this issue.
thank you in advance
Regards,
PD