From 476b0d24909dfb30f5b695607b1cd5720793632f Mon Sep 17 00:00:00 2001 From: Aleks Saul Date: Thu, 8 Jun 2017 14:44:43 -0400 Subject: [PATCH 1/2] vmware: private key variable --- Documentation/variables/vmware.md | 2 +- examples/terraform.tfvars.vmware | 2 +- modules/vmware/node/nodes.tf | 2 +- modules/vmware/node/variables.tf | 6 ++++++ platforms/vmware/main.tf | 2 ++ platforms/vmware/variables.tf | 2 +- 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Documentation/variables/vmware.md b/Documentation/variables/vmware.md index ee93c2d363..8a5a383871 100644 --- a/Documentation/variables/vmware.md +++ b/Documentation/variables/vmware.md @@ -26,7 +26,7 @@ This document gives an overview of variables used in the VMware platform of the | tectonic_vmware_node_dns | DNS Server to be useddd by Virtual Machine(s) | string | - | | tectonic_vmware_server | vCenter Server IP/FQDN | string | - | | tectonic_vmware_ssh_authorized_key | SSH public key to use as an authorized key. Example: `"ssh-rsa AAAB3N..."` | string | - | -| tectonic_vmware_ssh_private_key_path | SSH private key file corresponding to tectonic_vmware_ssh_authorized_key. If not provided, SSH agent will be used. | string | `` | +| tectonic_vmware_ssh_private_key_path | SSH private key file in .pem format corresponding to tectonic_vmware_ssh_authorized_key. If not provided, SSH agent will be used. | string | `` | | tectonic_vmware_sslselfsigned | Is the vCenter certificate Self-Signed? Example: `tectonic_vmware_sslselfsigned = "true"` | string | - | | tectonic_vmware_vm_template | Virtual Machine template of CoreOS Container Linux. | string | - | | tectonic_vmware_vm_template_folder | Folder for VM template of CoreOS Container Linux. | string | - | diff --git a/examples/terraform.tfvars.vmware b/examples/terraform.tfvars.vmware index 714df9efe1..2efdafe6a5 100644 --- a/examples/terraform.tfvars.vmware +++ b/examples/terraform.tfvars.vmware @@ -185,7 +185,7 @@ tectonic_vmware_server = "" // SSH public key to use as an authorized key. Example: `"ssh-rsa AAAB3N..."` tectonic_vmware_ssh_authorized_key = "" -// SSH private key file corresponding to tectonic_vmware_ssh_authorized_key. If not provided, SSH agent will be used. +// SSH private key file in .pem format corresponding to tectonic_vmware_ssh_authorized_key. If not provided, SSH agent will be used. tectonic_vmware_ssh_private_key_path = "" // Is the vCenter certificate Self-Signed? Example: `tectonic_vmware_sslselfsigned = "true"` diff --git a/modules/vmware/node/nodes.tf b/modules/vmware/node/nodes.tf index d8ee977677..570cf9e6df 100644 --- a/modules/vmware/node/nodes.tf +++ b/modules/vmware/node/nodes.tf @@ -26,7 +26,7 @@ resource "vsphere_virtual_machine" "node" { connection { type = "ssh" user = "core" - private_key = "${file(var.tectonic_vmware_ssh_private_key_path != "" ? pathexpand(var.tectonic_vmware_ssh_private_key_path) : "/dev/null")}" + private_key = "${file(var.private_key != "" ? pathexpand(var.private_key) : "/dev/null")}" } provisioner "file" { diff --git a/modules/vmware/node/variables.tf b/modules/vmware/node/variables.tf index 0f4b8b0caf..7bd3fd8ddc 100644 --- a/modules/vmware/node/variables.tf +++ b/modules/vmware/node/variables.tf @@ -125,6 +125,12 @@ variable "kubeconfig" { description = "Contents of Kubeconfig" } +variable "private_key" { + type = "string" + description = "SSH private key file corresponding to tectonic_vmware_ssh_authorized_key. If not provided, SSH agent will be used." + default = "" +} + variable "image_re" { description = < Date: Wed, 21 Jun 2017 13:40:24 -0400 Subject: [PATCH 2/2] modules/vmware: update private_key description --- modules/vmware/node/variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/vmware/node/variables.tf b/modules/vmware/node/variables.tf index 7bd3fd8ddc..6d87b8fd27 100644 --- a/modules/vmware/node/variables.tf +++ b/modules/vmware/node/variables.tf @@ -127,7 +127,7 @@ variable "kubeconfig" { variable "private_key" { type = "string" - description = "SSH private key file corresponding to tectonic_vmware_ssh_authorized_key. If not provided, SSH agent will be used." + description = "SSH private key file in .pem format corresponding to tectonic_vmware_ssh_authorized_key. If not provided, SSH agent will be used." default = "" }