Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Consider supporting multiple AWS profiles via --profile #86

Closed
jen20 opened this issue Jul 6, 2015 · 3 comments
Closed

Consider supporting multiple AWS profiles via --profile #86

jen20 opened this issue Jul 6, 2015 · 3 comments

Comments

@jen20
Copy link

jen20 commented Jul 6, 2015

Working with multiple AWS accounts, I have the AWS CLI configured with different profiles and switch amongst them by changing the AWS_DEFAULT_PROFILE environment variable. It would be good if terraforming respected this setting (which encompasses the keys and the region) in addition to the environment variables.

@dtan4
Copy link
Owner

dtan4 commented Jul 7, 2015

If you're using OS X, I recommend to use envchain.
It enables to handle multiple AWS credentials easily and securely 🔑

Like this:

$ envchain --set personal AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY
$ envchain --set company AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY

# w/ personal account profile
$ envchain personal terraforming s3

# w/ company account profile
$ envchain company terraforming s3

Otherwise if you're using another operating system, I don't have any good idea...

@jen20
Copy link
Author

jen20 commented Jul 7, 2015

The official AWS CLI already has a method for handling this via profiles - as I understand it from the Ruby SDK doc here the Ruby client will attempt by default to use the the shared credentials file as a second preference to environment variables.

To support profiles it looks at first glance necessary to use an instance of these SharedCredentials.

Happy to look at pull requesting this functionality if it's likely to be accepted.

@dtan4
Copy link
Owner

dtan4 commented Nov 10, 2015

--profile option was implemented at #135 and released as v0.4.0 :shipit:
Please try this ❗

@dtan4 dtan4 closed this as completed Nov 10, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants