https://pulumi.com logo
Title
f

faint-dusk-40863

04/13/2021, 4:00 AM
Hello! What's the best channel to ask for help? Specifically about
pulumi import
for vSphere? I can't seem to figure out how to import a resource that requires a datacenter be set. Here is what I'm currently trying to use
pulumi import vsphere:index/computeCluster:ComputeCluster Management Mgmnt --parent datacenter=urn:pulumi:infra::vsphere::vsphere:index/datacenter:Datacenter::datacenter
I get the following error:
error: Preview failed: importing Mgmnt: error loading cluster: please specify a datacenter
Thank you for any help!
w

white-balloon-205

04/13/2021, 5:08 AM
I believe the format of an
id
for this resource is
/dc1/host/compute-cluster
, so that you would do:
pulumi import vsphere:index/computeCluster:ComputeCluster Management /dc1/host/Mgmnt --parent datacenter=urn:pulumi:infra::vsphere::vsphere:index/datacenter:Datacenter::datacenter
Unfortunately this format doesn't appear to be showing up in the docs as I'd expect it to - would you mind opening an issue on that in https://github.com/pulumi/pulumi-vsphere?
f

faint-dusk-40863

04/13/2021, 1:20 PM
Will do, thank you!
This ended up being the command that worked for me
pulumi import vsphere:index/computeCluster:ComputeCluster Management /Datacenter/host/Mgmnt --parent datacenter=urn:pulumi:infra::vsphere::vsphere:index/datacenter:Datacenter::datacenter
since /Datacenter is the name of the datacenter in vsphere, thank you very much!
p

purple-nail-36818

05/22/2021, 9:46 PM
@faint-dusk-40863 did you end up filing an issue for this? I'm having trouble understanding the problem as you stated it, also not understanding which documentation is lacking detail.
f

faint-dusk-40863

07/18/2021, 9:32 PM
@purple-nail-36818 Sorry for never getting back to you, the lack of documentation is purely just the need to have
host
between the datacenter name and the computercluster. So rather than
dc1/compute-cluster
it needs to be
dc1/host/computer-cluster
. Would you still like a ticket?