From d9fdab7766b65a268a195ae75957b4d7da007f0f Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Fri, 13 Dec 2019 12:53:10 +0100 Subject: [PATCH] Bugfixing on importing existing VMs in terraform --- lib/cr_tf/handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cr_tf/handler.py b/lib/cr_tf/handler.py index 6ad9df0..ca7bf22 100644 --- a/lib/cr_tf/handler.py +++ b/lib/cr_tf/handler.py @@ -60,7 +60,7 @@ from .terraform.disk import TerraformDisk from .xlate import XLATOR -__version__ = '3.2.2' +__version__ = '3.2.3' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -2818,7 +2818,7 @@ class CreateTerraformHandler(BaseHandler): vm_obj = 'vsphere_virtual_machine.{}'.format(vm.tf_name) path = '/{dc}/{f}/{p}/{n}'.format( dc=self.vsphere[vs_name].dc, f=self.vsphere[vs_name].dc_obj.vm_folder, - p=vm.config_path, n=vm.name) + p=vm.path, n=vm.name) cmd = [str(self.terraform_cmd), 'import', vm_obj, path] result = self.run( cmd, may_simulate=True, timeout=tf_timeout, -- 2.39.5