Is there any way to list the permissions associated with a (custom) role in Google Cloud Platform IAM using gcloud? I can find how to list the roles, but not the permissions associated with a given role.
Asked
Active
Viewed 6,524 times
4
Scott Queen
- 43
3 Answers
7
You can list the permissions associated with a role using this command. Replace the role name with your custom role name.
gcloud iam roles describe roles/editor
Documentation: gcloud iam roles describe
John Hanley
- 5,164
2
Not sure why the other answer is the one with the most upvotes, doesn't actually answer the question about getting a custom role.
To follow up the above comment:
Custom role at organization level: gcloud iam roles describe [roleId] --organization=[organizationId]
Custom role at the project level: gcloud iam roles describe [roleId] --project=[projectId]
Martin Beck
- 21
1
for predefined role:
gcloud iam roles describe roles/[roleid]
for custom role:
gcloud iam roles describe [roleid] --project=[projectid]