fix: update procure/aws to use AWS credentials provider chain #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi
I noticed we had taken the option to specify
aws_access_key_id
andaws_secret_access_key
in theprocure/aws
example. This is somewhat of an anti-pattern and incompatible with more modern security best practices to only use short lived or temporary access tokens.I have modifed the provider to not specify this, and instead rely on the AWS credentials provider chain which will cascade through a handful of possible places the credentials might be provisioned.
This means each user/invoker can choose how to provisiion credentials, ie:
or
AWS_PROFILE=my-profile-entry terraform init
if credentials are in ~/.aws/credentials, or other areas if necessary (ie: instance temporary credentials).Thank you