Use hashicorp/aws-sdk-go-base to authenticate s3 storage #9
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.
In #2, I added s3 storage with a primitive aws-sdk-go, but the initial implementation doesn't work with a localstack environment because it requires force_path_style option. In addition, I want to use a explicit profile setting for multi-accounts environment rather than implicit access key via environment variable. Since Terraform's s3 backend has many authentication options, I can imagine some people want to other options and they expect the order of reading credentials to be the same as Terraform.
Fortunately, The Terraform s3 backend and AWS provider authentication logic is split into an external library named hashicorp/aws-sdk-go-base. I think using the same library as Terraform will reduce confusion.
However, there are many minor options and it's a pain to test all options from first, so I added only options I need for now. If something missing, feel free to open an issue or submit a pull request.