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

Use aws.DetectCreds and don't require aws creds in environment #1343

Closed
wants to merge 3 commits into from
Closed

Use aws.DetectCreds and don't require aws creds in environment #1343

wants to merge 3 commits into from

Conversation

garethlewin
Copy link

No description provided.

@radeksimko
Copy link
Member

See #1049

@garethlewin
Copy link
Author

#1049 is a much bigger and more complex change that has obviously been taking time. This is a minor change (really 1 line) that should (I am pretty sure) require no changes to people's already existing workflows but will also support other aws workflows. Packer already does this correctly for example.

@radeksimko
Copy link
Member

#1049 is a much bigger and more complex change that has obviously been taking time.

Agreed, it's not trivial solution because the problem is not trivial.

This PR on the other hand can break many existing codebases. De-facto all existing module examples are relying on access_key & secret_key being passed statically. All this is for good reasons. You may also end up using different keys/permissions for each module someday.
https://github.com/terraform-community-modules

Don't get me wrong, I'm all with you on making it happen, I just don't want to cause harm to anyone relying on API from the latest release.

A lot has changed since 0.3.7 and the current master is already in backward-incompatible state as it ignores certain ENV vars which were previously covered by goamz.

I believe this needs to be solved somehow until the next release so it's backward-compatible. // correct me if I'm wrong @catsby

I will try and take a look at the bits that need to be done to move #1049 forward during the weekend unless someone else will be quicker.

@garethlewin
Copy link
Author

This PR on the other hand can break many existing codebases. De-facto all existing module examples are relying on access_key & secret_key being passed statically

I might be missing something in the code, but it is relying on them being in the environment statically. And since this method will check the environment first, shouldn't it still work for them? That was my goal.

@catsby
Copy link
Contributor

catsby commented Apr 2, 2015

As it stands, this pull request breaks for anyone using credentials in the configuration (or in modules, etc.). Specifying them that was becomes an error, was that intentional?

@garethlewin
Copy link
Author

Ok, I misunderstood the options, my mistake thanks @catsby .

So now my change is even simpler, it removes the requirement from the access_key and secret_key variables, but still leaves them in. DetectCreds will call Creds with whatever value it has if they are not nil so this should act exactly the same for existing setups.

If access_key and secret_key are not set and they don't get values from the environment then it should use the rest of the DetectCreds flow.

@garethlewin
Copy link
Author

@catsby does my latest change resolve your concerns?

@BRMatt
Copy link

BRMatt commented Apr 9, 2015

It's worth noting that the core team seem to want the access key/secret key to be "required" so that the user will be prompted for them during demos/initial setup.

@catsby
Copy link
Contributor

catsby commented Apr 10, 2015

@garethlewin yes! Though, I unintentionally duplicated this myself yesterday in #1470 😦 I had forgotten about this PR, sorry!

I think too that we need the key/secret to be required too, so we should probably just close this.
Thank you for the contribution! Sorry I robbed you of credit here

@catsby catsby added the waiting-response An issue/pull request is waiting for a response from the community label Apr 10, 2015
@catsby catsby closed this May 1, 2015
@ghost
Copy link

ghost commented May 3, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement provider/aws waiting-response An issue/pull request is waiting for a response from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants