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

AWS Provider: support ~/.aws/config #186

Closed
hashibot opened this issue Jun 13, 2017 · 5 comments
Closed

AWS Provider: support ~/.aws/config #186

hashibot opened this issue Jun 13, 2017 · 5 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. provider Pertains to the provider itself, rather than any interaction with AWS.

Comments

@hashibot
Copy link

This issue was originally opened by @cjeanneret as hashicorp/terraform#7192. It was migrated here as part of the provider split. The original body of the issue is below.


Hello,

Currently, aws provider supports the "profile" setting, allowing to pass directly a profile instead of the access keys. That works well.
Apparently, it directly goes in the ~/.aws/credentials file in order to take the matching authentication information. The file format is as follow:

[profile_name1]
aws_access_key_id= ....
aws_secret_access_key = ...
[profile_name2]
aws_access_key_id= ....
aws_secret_access_key = ...

So far, so good, it just works.

Now, there's a second file in ~/.aws directory: config.
This one has a small difference regarding its structure and information:

[profile profile_name1]
region = eu-west-1
[profile profile_name2]
region = us-west-1

As you might guess, credentials shouldn't be in that file, but there are other stuff, like the region.
Currently, when we use the AWS provider, we ask the user for the profile name in order to get the credentials, but we still have to fix the region on the tf file.

It would be great if Terraform could take advantage of the ~/.aws/config file as well in order to find the region and, maybe, other specificities we might put in there in order to auto-complet the provider configuration.

Apparently, there are a lot of possibilities, and that would also allow to set the "region" to non-required, like the profile and access keys.

Thank you!

Cheers,

C.

@hashibot hashibot added the enhancement Requests to existing resources that expand the functionality or scope. label Jun 13, 2017
@eldridge
Copy link

It looks like there was a PR submitted for this back in February: hashicorp/terraform#11734

@bflad bflad added the provider Pertains to the provider itself, rather than any interaction with AWS. label Jan 28, 2018
@loesak
Copy link

loesak commented Aug 28, 2018

I just ran into this myself. Whats the status on this? seems like a fairly reasonable request.

@AlmogCohen
Copy link

+1

@bflad
Copy link
Contributor

bflad commented Jul 7, 2020

Hi folks 👋 This appears to be a duplicate of #687, so to consolidate discussions and efforts, I'm going to close this issue in preference of that one. Please 👍 upvote that issue and subscribe to it for further updates on this topic.

@bflad bflad closed this as completed Jul 7, 2020
@ghost
Copy link

ghost commented Aug 6, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Aug 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. provider Pertains to the provider itself, rather than any interaction with AWS.
Projects
None yet
Development

No branches or pull requests

5 participants