Skip to content

Commit

Permalink
Add Sigv4 Endpoint config parameter
Browse files Browse the repository at this point in the history
Signed-off-by: Nicole Wren <[email protected]>
  • Loading branch information
kanwren committed Apr 24, 2024
1 parent 5c108f8 commit 3442f5d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions sigv4/sigv4.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func NewSigV4RoundTripper(cfg *SigV4Config, next http.RoundTripper) (http.RoundT
sess, err := session.NewSessionWithOptions(session.Options{
Config: aws.Config{
Region: aws.String(cfg.Region),
Endpoint: aws.String(cfg.Endpoint),
Credentials: creds,
},
Profile: cfg.Profile,
Expand Down
1 change: 1 addition & 0 deletions sigv4/sigv4_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type SigV4Config struct {
SecretKey config.Secret `yaml:"secret_key,omitempty"`
Profile string `yaml:"profile,omitempty"`
RoleARN string `yaml:"role_arn,omitempty"`
Endpoint string `yaml:"endpoint,omitempty"`
}

func (c *SigV4Config) Validate() error {
Expand Down
1 change: 1 addition & 0 deletions sigv4/testdata/sigv4_good.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ access_key: AccessKey
secret_key: SecretKey
profile: profile
role_arn: blah:role/arn
endpoint: https://sts.us-west-2.amazonaws.com

0 comments on commit 3442f5d

Please sign in to comment.