Skip to content

Commit

Permalink
fix: bug with operator check on optional session and external id (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen authored Feb 23, 2024
1 parent f11bde6 commit b615c9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/awsutil/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ func (c *Credentials) rootSession() (*session.Session, error) {
// if given a role to assume, overwrite the session credentials with assume role credentials
if c.AssumeRoleArn != "" {
sess.Config.Credentials = stscreds.NewCredentials(sess, c.AssumeRoleArn, func(p *stscreds.AssumeRoleProvider) {
if c.RoleSessionName == "" {
if c.RoleSessionName != "" {
p.RoleSessionName = c.RoleSessionName
}

if c.ExternalId == "" {
if c.ExternalId != "" {
p.ExternalID = aws.String(c.ExternalId)
}
})
Expand Down

0 comments on commit b615c9e

Please sign in to comment.