Skip to content

Commit e543699

Browse files
committed
fix: log IAM context kvs properly
1 parent a3a4970 commit e543699

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal/validators/iam/iam_validator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ func (s *IAMRuleService) getPolicyDocument(policyArn *string, ctx []string) (*aw
206206
PolicyArn: policyArn,
207207
})
208208
if err != nil {
209-
s.log.V(0).Error(err, "failed to get IAM policy", ctx, "policyArn", policyArn)
209+
s.log.V(0).Error(err, "failed to get IAM policy", ctx[0], ctx[1], "policyArn", policyArn)
210210
return nil, err
211211
}
212212
policyVersionOutput, err := s.iamSvc.GetPolicyVersion(context.Background(), &iam.GetPolicyVersionInput{
@@ -230,7 +230,7 @@ func (s *IAMRuleService) getPolicyDocument(policyArn *string, ctx []string) (*aw
230230
}
231231
policyDocument := &awspolicy.Policy{}
232232
if err := policyDocument.UnmarshalJSON([]byte(policyUnescaped)); err != nil {
233-
s.log.V(0).Error(err, "failed to unmarshal IAM policy", ctx, "policyArn", policyArn)
233+
s.log.V(0).Error(err, "failed to unmarshal IAM policy", ctx[0], ctx[1], "policyArn", policyArn)
234234
return nil, err
235235
}
236236
return policyDocument, nil

0 commit comments

Comments
 (0)