diff --git a/examples/vault-consul-ami/vault-consul.json b/examples/vault-consul-ami/vault-consul.json index 1bca7deb..86a859e8 100644 --- a/examples/vault-consul-ami/vault-consul.json +++ b/examples/vault-consul-ami/vault-consul.json @@ -2,7 +2,7 @@ "min_packer_version": "0.12.0", "variables": { "aws_region": "us-east-1", - "vault_version": "0.11.5", + "vault_version": "1.0.0", "consul_module_version": "v0.4.2", "consul_version": "1.3.1", "consul_download_url": "{{env `CONSUL_DOWNLOAD_URL`}}", diff --git a/modules/run-vault/run-vault b/modules/run-vault/run-vault index 034effd5..45c437a8 100755 --- a/modules/run-vault/run-vault +++ b/modules/run-vault/run-vault @@ -155,11 +155,17 @@ function generate_vault_config { local auto_unseal_config="" if [[ "$enable_auto_unseal" == "true" ]]; then + + local endpoint="" + if [[ -n "$auto_unseal_endpoint" ]]; then + endpoint="endpoint = '$auto_unseal_endpoint'" + fi + auto_unseal_config=$(cat <