terraform/exec: Pass through all environment variables #139
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #138
This should address many use cases where some form of external auth provider is being looked up by the provider or state backend.
e.g. https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html in case of Kubernetes or
az
(Azure CLI) in case of AzureRM.and also allow authentication from behind a corporate proxy, which can be configured on the workstation in such a way that the address of the proxy server is in standard environment variables.
We pass through all variables that are given to the server, which means that these could be reused between different workspaces, but this should be fairly safe for now, because
a) the language server doesn't execute
terraform
command that could do damage when provided wrong variables. We are working with the assumption thatterraform providers schema -json
does not push state.b) we only allow one workspace at a time to be initialized anyway