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

ENV should take precedence over configuration #289

Open
romans-ovo opened this issue Jun 11, 2024 · 0 comments
Open

ENV should take precedence over configuration #289

romans-ovo opened this issue Jun 11, 2024 · 0 comments
Milestone

Comments

@romans-ovo
Copy link

romans-ovo commented Jun 11, 2024

A typical expected behaviour for any options would be:

  1. take from command-line arguments (if supported)
  2. take from ENV variables
  3. take from .config-files

Looking at this code however, it seems that there is a problem: https://github.com/tellerops/teller/blob/master/teller-providers/src/providers/hashicorp_vault.rs#L61

If options are provided in the configuration they would take precedence over ENV, but more importantly if you only specify ADDRESS as an option, it will not take TOKEN from the env.

I think this behaviour could be improved to look for the value in the environment and if not found, check the opts. I'm happy to provide PR.

While I noticed the problem in Vault provider, there may be similar behaviour elsewhere, I haven't checked.

@jondot jondot added this to the 2.1 milestone Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants