Skip to content

Commit

Permalink
Change Warn -> Debug for invalid account/roles
Browse files Browse the repository at this point in the history
Fixes: #980
  • Loading branch information
synfinatic committed Jul 12, 2024
1 parent 3ba9500 commit e09bc31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

### Changes

* No longer show help for sub-commands by default
* No longer show help for sub-commands by default
* Warnings about invalid accounts/roles in config.yaml are now Debug messages #980

### New Features

Expand Down
4 changes: 2 additions & 2 deletions sso/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ func (c *Cache) addConfigRoles(r *Roles, config *SSOConfig) error {
return err
}
if _, ok := r.Accounts[id]; !ok {
log.Warnf("config.yaml defines AWS AccountID %d, but you don't have access.", id)
log.Debugf("config.yaml defines AWS AccountID %d, but you don't have access.", id)
continue
}
r.Accounts[id].DefaultRegion = account.DefaultRegion
Expand Down Expand Up @@ -612,7 +612,7 @@ func (c *Cache) addConfigRoles(r *Roles, config *SSOConfig) error {
// set the tags from the config file
for roleName, role := range config.Accounts[accountId].Roles {
if _, ok := r.Accounts[id].Roles[roleName]; !ok {
log.Warnf("config.yaml has %s but you don't have access", utils.MakeRoleARN(id, roleName))
log.Debugf("config.yaml has %s but you don't have access", utils.MakeRoleARN(id, roleName))

Check warning on line 615 in sso/cache.go

View check run for this annotation

Codecov / codecov/patch

sso/cache.go#L615

Added line #L615 was not covered by tests
continue
}
r.Accounts[id].Roles[roleName].Arn = utils.MakeRoleARN(id, roleName)
Expand Down

0 comments on commit e09bc31

Please sign in to comment.