Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Fix order of env sources#253

Merged
SimonBarendse merged 1 commit intomasterfrom
fix/env-source-precedence
Feb 27, 2020
Merged

Fix order of env sources#253
SimonBarendse merged 1 commit intomasterfrom
fix/env-source-precedence

Conversation

@Marton6
Copy link
Copy Markdown
Member

@Marton6 Marton6 commented Feb 27, 2020

No description provided.

@SimonBarendse SimonBarendse added the bug Something isn't working label Feb 27, 2020
@SimonBarendse
Copy link
Copy Markdown
Member

To give some context, the order of precedence is defined as follows:

  1. Environment variables configured on the command-line with the --envar KEY=PATH flag, e.g. --envar DB_PASSWORD=path/to/secret
  2. Environment variables configured with the secret reference syntax in environment variables, e.g. secrethub://path/to/secret
  3. Environment variables configured in a .env file. By default secrethub.env is used; Use the --env-file flag to use a different file.
  4. Environment variables from the parent environment.

Copy link
Copy Markdown
Member

@SimonBarendse SimonBarendse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solves the issue 👍

@SimonBarendse SimonBarendse merged commit 896efa2 into master Feb 27, 2020
@SimonBarendse SimonBarendse deleted the fix/env-source-precedence branch February 27, 2020 14:34
@SimonBarendse SimonBarendse restored the fix/env-source-precedence branch February 27, 2020 14:38
@mackenbach
Copy link
Copy Markdown
Member

mackenbach commented Feb 28, 2020

To give some context, the order of precedence is defined as follows:

  1. Environment variables configured on the command-line with the --envar KEY=PATH flag, e.g. --envar DB_PASSWORD=path/to/secret
  2. Environment variables configured with the secret reference syntax in environment variables, e.g. secrethub://path/to/secret
  3. Environment variables configured in a .env file. By default secrethub.env is used; Use the --env-file flag to use a different file.
  4. Environment variables from the parent environment.

@Marton6 and @SimonBarendse is this documented somewhere? If not, it should at least be documented on the website.

@SimonBarendse
Copy link
Copy Markdown
Member

@mackenbach This bug was discovered before the secrethub reference syntax docs were published. Therefore, we chose to release this bugfix first, before publishing the docs. We will publish these today.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants