Skip to content

Commit

Permalink
add 'AWS_REGION' when formatting credentials output
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVulaj committed Jun 6, 2024
1 parent a8a9d8a commit 33fdf6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/credentials/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const (
AwsExportFormat = `export AWS_ACCESS_KEY_ID=%s
export AWS_SECRET_ACCESS_KEY=%s
export AWS_SESSION_TOKEN=%s
export AWS_DEFAULT_REGION=%s`
export AWS_DEFAULT_REGION=%s
export AWS_REGION=%s`
)

type AWSCredentialsResponse struct {
Expand All @@ -40,7 +41,7 @@ func (r *AWSCredentialsResponse) String() string {
}

func (r *AWSCredentialsResponse) FmtExport() string {
return fmt.Sprintf(AwsExportFormat, r.AccessKeyID, r.SecretAccessKey, r.SessionToken, r.Region)
return fmt.Sprintf(AwsExportFormat, r.AccessKeyID, r.SecretAccessKey, r.SessionToken, r.Region, r.Region)
}

// AWSV2Config returns an aws-sdk-go-v2 config that can be used to programmatically access the AWS API
Expand Down

0 comments on commit 33fdf6e

Please sign in to comment.