Terraform, Resource Not Found

less than 1 minute read

Terraform can’t find my Datastore?

Terraform couldn’t find my datastore so I use GOVC to get the exact path.

Once installing GOVC I was able to find the path via govc datastore.info.

Output from the script will contain the path:

Name: TXDatastore01 
Path: /Datacenter/datastore/TXDatastore01


I took the path and added it to the Terraform file:

    data "vsphere_datastore" "datastore" { 
        name          = "/Datacenter/datastore/TXDatastore01" 
        datacenter_id = data.vsphere_datacenter.dc.id 
     }

Updated: