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

Uses AWS SDK BuildableClient for custom HTTP client #116

Merged
merged 1 commit into from
Feb 15, 2022

Conversation

gdavison
Copy link
Contributor

The custom HTTP client previously used did not properly handle retrieving credentials from IMDS when running in a container. Replaced the client with the BuildableClient supplied by the AWS SDK.

Closes #110
Relates hashicorp/terraform-provider-aws#23110
Relates hashicorp/terraform-provider-aws#23182

@gdavison gdavison requested a review from a team as a code owner February 14, 2022 22:37
@YakDriver YakDriver self-assigned this Feb 14, 2022
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🎉

% make test
go test -timeout=30s -parallel=4 ./...
go: downloading github.com/aws/aws-sdk-go-v2/config v1.13.1
go: downloading github.com/aws/aws-sdk-go-v2/internal/ini v1.3.5
ok  	github.com/hashicorp/aws-sdk-go-base/v2	1.574s
?   	github.com/hashicorp/aws-sdk-go-base/v2/internal/awsconfig	[no test files]
?   	github.com/hashicorp/aws-sdk-go-base/v2/internal/config	[no test files]
?   	github.com/hashicorp/aws-sdk-go-base/v2/internal/constants	[no test files]
?   	github.com/hashicorp/aws-sdk-go-base/v2/internal/endpoints	[no test files]
ok  	github.com/hashicorp/aws-sdk-go-base/v2/internal/httpclient	0.587s
?   	github.com/hashicorp/aws-sdk-go-base/v2/mockdata	[no test files]
?   	github.com/hashicorp/aws-sdk-go-base/v2/servicemocks	[no test files]
cd v2/awsv1shim && go test -timeout=30s -parallel=4 ./...
go: downloading github.com/aws/aws-sdk-go v1.42.52
ok  	github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2	0.908s
?   	github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2/mockdata	[no test files]
ok  	github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2/tfawserr	0.822s

t.Fatalf("unexpected error: %s", err)
}

transport := client.GetTransport()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't love AWS's Javaisms...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AWS is a Java shop :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Authentication Issues
2 participants