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 7eccf27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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 7eccf27

Please sign in to comment.