I'd like to see wich Roles in iam yield a certain permission.
In other words, for a given permission (like billing.accounts.updateUsageExportSpec) I want to know a list of Roles, that satisfy this permission.
Asked
Active
Viewed 56 times
1
manasouza
- 237
- 1
- 4
Nils Martel
- 11
- 2
2 Answers
1
Looks like only the roles/billing.admin:
https://cloud.google.com/iam/docs/understanding-roles#billing-roles
erk
- 131
- 2
0
If under unix, with gcloud SDK you can execute the following script:
export expected_permission=billing.accounts.updateUsageExportSpec
for role in $(gcloud iam roles list --format='value(NAME)');
do permissions=$(gcloud iam roles describe $role --format='value(includedPermissions)')
if [[ $permissions =~ $expected_permission ]]; then echo "-------------------------------------------------" && echo $role && echo "-------------------------------------------------"; fi
done
Either way, there's this reference in official docs where permission/roles mapping can be shown
manasouza
- 237
- 1
- 4