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

Show export AWS environment variables in current shell #126

Closed
circledevops opened this issue Jul 22, 2018 · 2 comments
Closed

Show export AWS environment variables in current shell #126

circledevops opened this issue Jul 22, 2018 · 2 comments

Comments

@circledevops
Copy link

circledevops commented Jul 22, 2018

To have feature parity with https://github.com/onelogin/onelogin-aws-cli-assume-role , it should print out the export AWS environment variables for the user in the current shell. This also helps with Terraform users, as there is no way to specify an AWS profile.

Expected Behavior

After successful authentication, it should print out the commands to set these as the current AWS environment variables.

Current Behavior

credentials get cached in a different file

Possible Solution

print the export AWS environment variables for the user in the current shell.

Steps to Reproduce

Context (Environment)

I'm trying to run terraform with onelogin-aws-login unsuccessfully

Detailed Description

Possible Implementation

Please see pull request export_aws_variables
#126

@slycoder
Copy link
Contributor

Happy to look at any PR, but the FYI credentials are cached in the normal place (~/.aws/credentials). It prints the profile name to the command line already, something like:

123456789/OneLoginRole/your_id

So you can just set that as your aws profile when running terraform, i.e.,

AWS_PROFILE=123456789/OneLoginRole/your_id terraform your_commands

If you want to just override the default aws profile when running this command, you can just use the profile argument to this app,

onelogin-aws-login --profile default

@circledevops
Copy link
Author

circledevops commented Jul 25, 2018 via email

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

No branches or pull requests

2 participants