Error: "Datastore:<computed>'has already been deleted or has not been completely created" #2117
Open
4 tasks done
Labels
Milestone
Community Guidelines
Terraform
v1.7.0
Terraform Provider
v2.6.1
VMware vSphere
v7.0.3
Description
Hi,
I鈥檓 using terraform to create virtual machines with hashicorp/vsphere.
So far, there have been no problems creating them for a long time, but since provider version v2.5.0 problems started, now when I try and do everything the same way, the following error appears:
Important thing is that I'm using
storage_policy_id
to assign datastore for created VM and this cause the error above. I tried to assign datastore by attributedatastore_id
ordatastore_cluster_id
and no problem appeared.There are mentioned similar issues with same error which were solved in v2.5.1, but not with using VM storage policy to assign datastore.
I've tested my terraform code with provider version 2.4.3 and there were no problems. Since version v2.5.0 the error appears.
Affected Resources or Data Sources
resource/vsphere_virtual_machine
Terraform Configuration
Debug Output
https://gist.github.com/shumak80/76702ee2e4e765e860b3093e4b91bc5c
Panic Output
no crash.log
Expected Behavior
Create virtual with assigned datastore by storage policy.
Actual Behavior
VM is not created with Error: disk.0: ServerFaultCode: The object 'vim.Datastore:' has already been deleted or has not been completely created
Steps to Reproduce
Create VM storage policy with rule to assign VM one datastore.
Create resource
vsphere_virtual_machine
with attributestorage_policy_id
.Environment Details
No response
Screenshots
No response
References
No response
The text was updated successfully, but these errors were encountered: