Skip to content

Commit 10fcba8

Browse files
committed
support pathed role names
1 parent 533e0fa commit 10fcba8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/managed-kubernetes-auditing-toolkit/eks/role_relationships.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,5 +237,5 @@ func getRoleDisplayName(role *role_relationships.IAMRole) string {
237237

238238
func getRoleName(role *role_relationships.IAMRole) string {
239239
parsedArn, _ := arn.Parse(role.Arn)
240-
return strings.Split(parsedArn.Resource, "/")[1]
240+
return strings.TrimPrefix(parsedArn.Resource, "role/")
241241
}

0 commit comments

Comments
 (0)