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

Support passthrough of system env for local-exec provisioner #23193

Closed

Conversation

alewando
Copy link

Allows the environment of the parent terraform process to be passed through to commands being invoked by the local-exec provisioner. Any variables explicitly specified in an environment block take precedence over those imported from the system.

I'm open to suggestions for a better argument name than system_environment.

The specific use case I'm after is passing AWS credentials down through to a local-exec provisioner. In my workflow, those (temporary) credentials are supplied as environment variables when terraform itself is invoked, so this will allow them to pass through. A solution to #8242 or #21983 would be better for a more general use case, but those don't seem likely to be implemented any time soon.

@hashicorp-cla
Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes


Adam Lewandowski seems not to be a GitHub user.
You need a GitHub account to be able to sign the CLA. If you already have a GitHub account, please add the email address used for this commit to your account.

Have you signed the CLA already but the status is still pending? Recheck it.

@alewando
Copy link
Author

Well, it turns out that local-exec already does this! Closing this PR.

@alewando alewando closed this Oct 26, 2019
@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants