-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fetching secret based on environment variable #24
Comments
Hi @NickIannelli! The likely reason why the example code does not work is because Buildkite steps are independent; environment variables and previous command outputs are not carried across to subsequent steps. The Feel free to reopen this if you have other questions or concerns. |
HI @72636c I was (and have) been using the The original code for the plugins is:
It appears that the secret attempting to be fetched is the raw string Any help would be greatly appreciated. |
I think it
I think it won't work because the plugin load the secret into environment variable when running environment hook. And at that time the meta-to-env plugin is not evaluated.. |
Problem
I am configuring my deploy pipeline so that the target environment can be selected from a list. That environment is then written into a variable ($$deploy_environment for example). What I am trying to do is fetch the relevant secret for said environment, following the path of
/app-name/$$deploy_environment
.Code
Expected: This should fetch either the
my-app/dev/env
secret or themy-app/prod/env
secret depending on which is selected.Actual: When fetching, the below error is returned from SecretsManager
Error appears to be because it's not evaluating the expression before fetching it from secrets manager.
Questions
Many thanks!
Nick.
The text was updated successfully, but these errors were encountered: