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 custom env variables #221

Open
stephengroat opened this issue Feb 13, 2018 · 4 comments
Open

Support custom env variables #221

stephengroat opened this issue Feb 13, 2018 · 4 comments
Labels

Comments

@stephengroat
Copy link

Looking to see if there's any interest in support custom environment variables, i.e. FOO=bar

Primary use is for TF_VAR_foo. There's a few terraform providers (i.e. Github, etc.) that use user-scoped keys instead of globally scoped keys (global keys could be used in kms with chamber or another shared keystore, but the user-scoped keys should probably be kept locally)

is there any interest in a feature like this if a pr is made or is aws-vault soley going to focus on aws creds (completely valid as well)? also, thanks for all the great work!

@stale
Copy link

stale bot commented Jun 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 23, 2019
@stale stale bot closed this as completed Jun 30, 2019
@goldmont
Copy link

goldmont commented Apr 9, 2021

News?

@jmvbxx
Copy link

jmvbxx commented Feb 6, 2023

Any update on this?

@mtibben mtibben closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2023
@mtibben mtibben reopened this Feb 28, 2023
@mtibben mtibben added feature and removed stale labels Feb 28, 2023
@teake
Copy link

teake commented Mar 8, 2024

As a workaround (and if you're using fish), you can set an environment variable based on the name of the profile while invoking aws-vault exec. Simply create a file ~/.config/fish/functions/aws-vault.fish with the following content, and you're done:

function aws-vault --wraps aws-vault --description 'alias aws-vault=aws-vault'
  set --local argv_nooptions (string match --invert -- '-*' $argv)
  if set --query argv_nooptions[2]; and [ $argv_nooptions[1] = exec ]
	set --local profile $argv_nooptions[2]
	set --export KUBECONFIG $HOME/.kube/config-$profile
  end 
  command aws-vault $argv  
end

Here the name of the profile gets appended to the name of the kubectl config file, so you don't have to update the kubectl config each time a different aws-vault profile is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants