Import Vm Config with Terraform
$terraform import module.s130wafe000.vsphere_virtual_machine.vm_win "/NLAM0C0/vm/S130/s130wafe000.win.tech.altenar.net"
module.s130wafe000.vsphere_virtual_machine.vm_win
module - because it’s module
s130wafe000 - module name
vsphere_virtual_machine - resource type as it is in provider
vm_win - source name which used to create vm
use GOVC to find resources in vmware clusters
export variables
export GOVC_USERNAME=username@vsphere.local
export GOVC_PASSWORD=SuperSecurePassword123
export GOVC_INSECURE=true
$ govc find vm -name s130wafe000.win.tech.altenar.net
vm/S130/s130wafe000.win.tech.altenar.net
https://github.com/vmware/govmomi/tree/master/govc
Last updated
Was this helpful?