]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Bugfixing on importing existing VMs in terraform
authorFrank Brehm <frank.brehm@pixelpark.com>
Fri, 13 Dec 2019 11:53:10 +0000 (12:53 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Fri, 13 Dec 2019 11:53:10 +0000 (12:53 +0100)
lib/cr_tf/handler.py

index 6ad9df0b523b92d23a6450f19a17703756932704..ca7bf221193b57fe8ffa4afd533949800bb2c93e 100644 (file)
@@ -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,