]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Renaming terraform variables
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 9 Sep 2021 15:10:16 +0000 (17:10 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 9 Sep 2021 15:10:16 +0000 (17:10 +0200)
lib/cr_tf/__init__.py
lib/cr_tf/handler.py

index 2304d5c77965fe808b8371c21cf2f4be81a67d8c..f3e84c3e389ac41b3a6dece791f39ad7fc736e54 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/env python3
 # -*- coding: utf-8 -*-
 
-__version__ = '1.5.0'
+__version__ = '1.5.1'
 
 MIN_VERSION_TERRAFORM = '1.0.5'
 MAX_VERSION_TERRAFORM = '1.2.0'
index 80405f0ada85e7dbffcc2353d12283a095f243b1..4a368e696d6918c18b7f75c037949153f6de57ea 100644 (file)
@@ -67,7 +67,7 @@ from .terraform.disk import TerraformDisk
 
 from .xlate import XLATOR
 
-__version__ = '3.6.1'
+__version__ = '3.6.2'
 LOG = logging.getLogger(__name__)
 
 _ = XLATOR.gettext
@@ -2251,7 +2251,8 @@ class CreateTerraformHandler(BaseHandler):
         # create manually a file 'terraform-private.auto.tfvars"
         # with the following content:
         #
-        #   vsphere_password    = "<PASSWORD>"
+        #   vsphere_username    = "<USERNAME>"
+        #   vsphere_userpasswd  = "<PASSWORD>"
         #   pdns_api_key        = "<API-KEY>"
         #
         # with the correct values. This file will not be under GIT control
@@ -2271,9 +2272,9 @@ class CreateTerraformHandler(BaseHandler):
         if vs_user or vs_pwd:
             content = '# Private sensible information. Please keep this file secret.\n\n'
             if vs_user:
-                content += 'vsphere_user     = "{}"\n.'.format(vs_user)
+                content += 'vsphere_username   = "{}"\n.'.format(vs_user)
             if vs_pwd:
-                content += 'vsphere_password = "{}""\n.'.format(vs_pwd)
+                content += 'vsphere_userpasswd = "{}""\n.'.format(vs_pwd)
             content += '\n'
 
             LOG.debug(_("Creating {!r} ...").format('private.auto.tfvars'))
@@ -2304,12 +2305,12 @@ class CreateTerraformHandler(BaseHandler):
         content += tpl.format(vs_host)
 
         tpl = textwrap.dedent('''\
-        variable "vsphere_user" {
+        variable "vsphere_username" {
           description = "vSphere accountname to be used."
           type        = string
         }
 
-        variable "vsphere_password" {
+        variable "vsphere_userpassword" {
           description = "Password for vSphere accountname."
           type        = string
         }
@@ -2365,8 +2366,8 @@ class CreateTerraformHandler(BaseHandler):
 
         provider "vsphere" {
           vsphere_server       = var.vsphere_vcenter
-          user                 = var.vsphere_user
-          password             = var.vsphere_password
+          user                 = var.vsphere_username
+          password             = var.vsphere_userpassword
           allow_unverified_ssl = true
         ''')