Skip to content

Commit

Permalink
e2e: path fixes for local_binary uploads (hashicorp#9137)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tgross authored and fredrikhgrelland committed Oct 22, 2020
1 parent a70d318 commit e755ef4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions e2e/terraform/provision-nomad/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down Expand Up @@ -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"
}

Expand All @@ -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"
}

Expand Down

0 comments on commit e755ef4

Please sign in to comment.