Last active
July 30, 2019 13:19
-
-
Save bgeesaman/ed4480d4eaf93e7e5c39ae8e5c4270c3 to your computer and use it in GitHub Desktop.
Revisions
-
bgeesaman renamed this gist
Jul 23, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
bgeesaman created this gist
Jul 23, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ #!/usr/bin/env bash ALL_ROLES="$(gcloud iam roles list --format=json | jq -r '.[].name')" for i in $ALL_ROLES; do CURRENT_ROLE="${i}" CURRENT_ROLE_PERMS="$(gcloud iam roles describe ${i} --format=json | jq -r '.includedPermissions[]?' | egrep 'container.clusters.get$|container.clusters.list')" if [[ ! -z "${CURRENT_ROLE_PERMS}" ]]; then echo "${CURRENT_ROLE} has: " echo "${CURRENT_ROLE_PERMS}" fi CURRENT_ROLE_PERMS="" done