Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

Commit

Permalink
metal: add tectonic_ssh_private_key variable
Browse files Browse the repository at this point in the history
Allow users to specify the SSH private key via a variable in cases where
ssh-agent isn't available or configured.
  • Loading branch information
coreypobrien committed May 10, 2017
1 parent dc30418 commit 85f43dc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/terraform.tfvars.metal
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ tectonic_service_cidr = "10.3.0.0/16"
// Example: `ssh-rsa AAAB3N...`
tectonic_ssh_authorized_key = ""

// (optional) SSH private key corresponding to tectonic_ssh_authorized_key. If not provided, SSH agent will be used.
// tectonic_ssh_private_key = ""

// If set to true, a vanilla Kubernetes cluster will be deployed, omitting any Tectonic assets.
tectonic_vanilla_k8s = false

Expand Down
2 changes: 2 additions & 0 deletions platforms/metal/remote.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resource "null_resource" "kubeconfig" {
host = "${element(concat(var.tectonic_metal_controller_domains, var.tectonic_metal_worker_domains), count.index)}"
user = "core"
timeout = "60m"
private_key = "${var.tectonic_ssh_private_key}"
}

provisioner "file" {
Expand All @@ -32,6 +33,7 @@ resource "null_resource" "bootstrap" {
host = "${element(var.tectonic_metal_controller_domains, 0)}"
user = "core"
timeout = "60m"
private_key = "${var.tectonic_ssh_private_key}"
}

provisioner "file" {
Expand Down
6 changes: 6 additions & 0 deletions platforms/metal/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,9 @@ SSH public key to use as an authorized key.
Example: `ssh-rsa AAAB3N...`
EOF
}

variable "tectonic_ssh_private_key" {
type = "string"
description = "SSH private key corresponding to tectonic_ssh_authorized_key. If not provided, SSH agent will be used."
default = ""
}

0 comments on commit 85f43dc

Please sign in to comment.