hashicorp / terraform-aws-vault

A Terraform Module for how to run Vault on AWS using Terraform and Packer
Apache License 2.0
659 stars 465 forks source link

install-vault module cannot download AWS Presigned URL #185

Closed mabadillamycwt closed 4 years ago

mabadillamycwt commented 4 years ago

I'm using an AWS presigned URL to download Hashicorp consul and vault binaries - vault_download_url and consul_download_url.

vault and consul module versions versions:

    "consul_module_version": "v0.7.4",
    "vault_module_version": "v0.13.6",
{
    "type": "shell",
    "inline": [
      "if test -n \"{{user `vault_download_url`}}\"; then",
      " /tmp/terraform-aws-vault/modules/install-vault/install-vault --download-url {{user `vault_download_url`}};",
      "else",
      " /tmp/terraform-aws-vault/modules/install-vault/install-vault --version {{user `vault_version`}};",
      "fi"
    ],
    "pause_before": "30s"
  }

The above code generates this error

==> consul-vault-dev: Pausing 30s before the next provisioner...
==> consul-vault-dev: Provisioning with shell script: /tmp/packer-shell016593414
==> consul-vault-dev: /tmp/script_4420.sh: line 3: X-Amz-Signature=xxx: command not found
==> consul-vault-dev: /tmp/script_4420.sh: line 3: X-Amz-SignedHeaders=host: command not found
==> consul-vault-dev: /tmp/script_4420.sh: line 3: X-Amz-Expires=600: command not found