Merge pull request #14215 from justinsb/dont_swallow_misc_aws_errors

AWS IAM Role listing: don't ignore "other" errors
This commit is contained in:
Kubernetes Prow Robot 2022-09-01 12:15:19 -07:00 committed by GitHub
commit 3b5dccdf5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -2012,10 +2012,9 @@ func ListIAMRoles(cloud fi.Cloud, clusterName string) ([]*resources.Resource, er
klog.Warningf("could not find instance profile %q. Resource may already have been deleted: %v", name, awserror)
continue
}
} else {
getRoleErr = fmt.Errorf("calling IAM GetRole on %s: %w", name, err)
return false
}
getRoleErr = fmt.Errorf("calling IAM GetRole on %s: %w", name, err)
return false
}
for _, tag := range roleOutput.Role.Tags {
if fi.StringValue(tag.Key) == ownershipTag && fi.StringValue(tag.Value) == "owned" {