Ejemplo n.º 1
0
func resourceVIXVMDelete(d *schema.ResourceData, meta interface{}) error {
	config := meta.(*Config)
	vmxFile := d.Id()

	vm := new(vix.VM)
	vm.Provider = config.Product
	vm.VerifySSL = config.VerifySSL

	if password := d.Get("password"); password != nil {
		vm.Image.Password = d.Get("password").(string)
	}

	return vm.Destroy(vmxFile)
}