From 90ffbb863b2316011ea702271ae47e87563e6a45 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 9 Sep 2021 17:10:16 +0200 Subject: [PATCH] Renaming terraform variables --- lib/cr_tf/__init__.py | 2 +- lib/cr_tf/handler.py | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/cr_tf/__init__.py b/lib/cr_tf/__init__.py index 2304d5c..f3e84c3 100644 --- a/lib/cr_tf/__init__.py +++ b/lib/cr_tf/__init__.py @@ -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' diff --git a/lib/cr_tf/handler.py b/lib/cr_tf/handler.py index 80405f0..4a368e6 100644 --- a/lib/cr_tf/handler.py +++ b/lib/cr_tf/handler.py @@ -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 = "" + # vsphere_username = "" + # vsphere_userpasswd = "" # pdns_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 ''') -- 2.39.5