Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[provider/vault] Priority on env vars #12405

Closed
gaelreyrol opened this issue Mar 3, 2017 · 3 comments
Closed

[provider/vault] Priority on env vars #12405

gaelreyrol opened this issue Mar 3, 2017 · 3 comments

Comments

@gaelreyrol
Copy link

Hi,

When configuring Vault provider I am not able to override vault configuration using environnement variables like VAULT_CACERT or VAULT_CAPATH using this configuration :

provider "vault" {
  address = "https://vault.internal.lan:443"

  ca_cert_file = "/etc/ssl/certs/internal-ca.pem"
  ca_cert_dir  = "/etc/ssl/certs"
}

It prints out the following on a terraform plan when environnement variable VAULT_CACERT is set to /usr/local/etc/openssl/certs/internal-ca.pem

Error refreshing state: 1 error(s) occurred:

* failed to configure TLS for Vault API: Error loading CA File: open /etc/ssl/certs/internal-ca.pem: no such file or directory

Environnement variables should be able to override variables defined in vault provider or am I thinking wrong ?

Thanks

@jbardin
Copy link
Member

jbardin commented Mar 3, 2017

Hi @zevran,

It's unfortunately the other way around. The environment variables set the default values first when loading the schema, and the config can override them. I agree that this may not be the expected behavior, and I'll see if we have any precedence for this to make sure it's consistent throughout Terraform.

@gaelreyrol
Copy link
Author

I understand !
Anyway I'll find a workaround if this issue it's consistent throughout Terraform.
It appears to be so 😄

Thanks the quick answer.

You're doing a great job by the way.

@ghost
Copy link

ghost commented Apr 9, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 9, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants