Skip to content

Commit

Permalink
added accessdenied checking to parallelization functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kuannie1 committed Jul 21, 2020
1 parent e4f11ab commit ccfd9dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/aws_config_server/parallelization_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (a *ClientIDToAWSRoles) populateMapping(
}
iamClient := a.awsClient.WithIAM(workerAWSConfig).IAM.Svc
workerRoles, err := listRoles(ctx, iamClient, configParams)
if err != nil {
if processAWSErr(err) != nil {
return nil, errors.Wrapf(err, "error listing roles for %s", accountName)
}
// account aliases will be used to determine profile names
Expand Down Expand Up @@ -124,7 +124,7 @@ func (a *ClientIDToAWSRoles) awsTagFilter(
svc := a.awsClient.WithIAM(workerAWSConfig).IAM.Svc

tags, err := listRoleTags(ctx, svc, &config.RoleName)
if err != nil {
if processAWSErr(err) != nil {
return nil, errors.Wrapf(err, "error listing tags for %s", config.RoleName)
}

Expand Down Expand Up @@ -282,6 +282,6 @@ func parallelizeAggregateMapping(ctx context.Context,
for element := range outputChannel {
outputList = append(outputList, element)
}
logrus.Debug("end of parallelize function")
logrus.Debugf("end of parallelize function. Errors: %v", allErrs.ErrorOrNil())
return outputList, allErrs.ErrorOrNil()
}

0 comments on commit ccfd9dd

Please sign in to comment.