-
Notifications
You must be signed in to change notification settings - Fork 189
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
Support SECRET_PATH as ENV #187
Comments
See this PR: #167 ...hopefully they can merge it soon. We're doing a custom build to have this functionality available. |
Thanks @tyd. Is your build available somewhere? |
@kochanowski unfortunately not. But I'm just doing a checkout of the code from that PR and doing a build via docker based on the readme instructions |
Does #167 fix this? It is merged and I'm doing a release with it right now... so if so, we should be able to close this. |
Hey @eikenb I'm sorry for a long response, I totally missed that, but since I'm still using I don't see any documentation though, can you provide me some details how to test it? BTW it's strange that tool helping provide 12-factor principles for other tools and apps itself doesn't store its config in environment variables, don't you think? :) |
The docs updates were pretty minimal, with a segment in the prefix section. Lines 358 to 361 in 1e2809c
Simply put, you just reference the SECRET_PATH environment variable in the prefix.path config setting. Something like.. prefix {
path = "{{ env \"SECRET_PATH\" }}"
}
Kind of is... there are sort of hacky work-arounds. Like wrapping the call in a script which takes an environment variable with a base64 encoded version of the config and writes that to a temp file before running. The main problem is that most 12-factor apps are made to have a minimal config that works with a few env-vars... and it's harder to shoehorn a large config file like envconsul has into them without resorting to tricks like above. |
I've tried using this in the config:
But no dice, it tries to parse the hostname as a literal string |
It would be very useful if we could set path to the secret via environmental variable.
Now if I want to use one docker image in several projects I need to inject path with ugly sed hacks.
The text was updated successfully, but these errors were encountered: