From d552b4e8d1bfcf63a890922333678bbfd7b857ed Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Wed, 21 Oct 2020 10:20:22 -0400 Subject: [PATCH] e2e: path fixes for local_binary uploads (#9137) When uploading a local binary for provisioning, the location that we pass into the provisioning script needs to be where we uploaded it to, not the source on our laptop. Also, the null_resource for uploading needs to read in the private key, not its path. --- e2e/terraform/provision-nomad/main.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/terraform/provision-nomad/main.tf b/e2e/terraform/provision-nomad/main.tf index e4afce0da..3cb97694c 100644 --- a/e2e/terraform/provision-nomad/main.tf +++ b/e2e/terraform/provision-nomad/main.tf @@ -58,7 +58,7 @@ data "template_file" "arg_nomad_version" { } data "template_file" "arg_nomad_binary" { - template = var.nomad_local_binary != "" ? " ${local._arg}nomad_binary ${var.nomad_local_binary}" : "" + template = var.nomad_local_binary != "" ? " ${local._arg}nomad_binary /tmp/nomad" : "" } data "template_file" "arg_nomad_enterprise" { @@ -94,7 +94,7 @@ resource "null_resource" "upload_nomad_binary" { user = var.connection.user host = var.connection.host port = var.connection.port - private_key = var.connection.private_key + private_key = file(var.connection.private_key) timeout = "15m" } @@ -116,7 +116,7 @@ resource "null_resource" "upload_custom_configs" { user = var.connection.user host = var.connection.host port = var.connection.port - private_key = var.connection.private_key + private_key = file(var.connection.private_key) timeout = "15m" }