-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implement BASH_ENV functionality to share env vars between steps. #370
Comments
runatlantis#370 Signed-off-by: Andrii Nasinnyk <[email protected]>
runatlantis#370 Signed-off-by: Andrii Nasinnyk <[email protected]>
The
In my case the |
When I need to run TF apply in different environment, I usually export the
Shouldn't be like this? after reading this, it looks like I should be using terraform workspaces. Can someone comment? |
Problem
There is currently no way to share environment variables in between steps (see #369). This is useful for users that want to source secrets from custom scripts and use them in terraform.
Solution
To achieve this, we should implement
$BASH_ENV
type functionality where users can writeexport
statements to the file described by$BASH_ENV
which getssource
'd at each step:This would result in:
Implementation
source
that file in each step before executing the actual step codeNotes
sh -c ". $BASH_ENV && {user command}"
)The text was updated successfully, but these errors were encountered: