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
Edit: fixed link to gist containing debug/failure output below
If I create a datacenter in an empty vCenter, then attempt to place a vsphere_folder inside of that created datacenter, my apply fails with an error message:
vsphere_folder.terraform: cannot locate datacenter: could not find datacenter with id: dc: ServerFaultCode: The object 'vim.Datacenter:dc' has already been deleted or has not been completely created.
From my reading of the provider docs, this operation SHOULD be supported, but it seems as if ${vsphere_datacenter.dc.id} is resolving to the name of the datacenter, rather than the id.
In an empty vCenter (esxi 6.5), a datacenter named 'dc' would be created, and then a VM folder named "Terraform" would be created inside of that created datacenter.
Actual Behavior
Datacenter is created, but then the folder can't be created because the folder creation fails to find the correct datacenter object.
Steps to Reproduce
set vc_user = login user for vCenter;
set vc_password = password for vCenter user in step 1;
set vc_fqdn = host / ip of the vCenter to connect to and operate on;
terraform apply
Additional Notes
If I use terraform to create a folder in a pre-existing (manually created) Datacenter, it works as expected:
Hi @kbpease! I'd like to eventually get the id switched over to being the MOID instead of the name of the datacenter. To avoid breaking backwards compatibility, that will need to wait until v2.0 of the provider. In the meantime, I have added the moid attribute for the vsphere_datacenter resource in #575.
Using the following config for your folder in the 1.7.0 release:
Edit: fixed link to gist containing debug/failure output below
If I create a datacenter in an empty vCenter, then attempt to place a vsphere_folder inside of that created datacenter, my apply fails with an error message:
From my reading of the provider docs, this operation SHOULD be supported, but it seems as if ${vsphere_datacenter.dc.id} is resolving to the name of the datacenter, rather than the id.
Terraform Version
Terraform v0.11.7
vSphere Provider Version
provider.vsphere v1.6.0
Affected Resource(s)
vsphere_datacenter
vsphere_folder
Terraform Configuration Files
Debug Output
https://gist.github.com/kbpease/ade8c025b443368f1c05a99398bbfbf8
Expected Behavior
In an empty vCenter (esxi 6.5), a datacenter named 'dc' would be created, and then a VM folder named "Terraform" would be created inside of that created datacenter.
Actual Behavior
Datacenter is created, but then the folder can't be created because the folder creation fails to find the correct datacenter object.
Steps to Reproduce
terraform apply
Additional Notes
If I use terraform to create a folder in a pre-existing (manually created) Datacenter, it works as expected:
https://gist.github.com/kbpease/7815774f3cfaad443c14e7a7fed01b19
Note that the Datacenter ID is not "dc" now, but "datacenter-289".
The text was updated successfully, but these errors were encountered: