Skip to content

Commit

Permalink
fix(upgradeinsights): use ec2imds region resolver to create aws client (
Browse files Browse the repository at this point in the history
#285)

* use auto mode for defaults to create aws client

* update aws client config
  • Loading branch information
floreks authored Sep 26, 2024
1 parent 22f31a5 commit 73aae1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controller/upgradeinsights_cloudprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (in *EKSCloudProvider) toInsightDetails(insight *types.Insight) []*console.
func (in *EKSCloudProvider) config(ctx context.Context, ui v1alpha1.UpgradeInsights) (aws.Config, error) {
// If credentials are not provided in the request, then use default credentials.
if ui.Spec.Credentials == nil || ui.Spec.Credentials.AWS == nil {
return awsconfig.LoadDefaultConfig(ctx)
return awsconfig.LoadDefaultConfig(ctx, awsconfig.WithEC2IMDSRegion())
}

// Otherwise use provided credentials.
Expand Down

0 comments on commit 73aae1c

Please sign in to comment.