forked from gursimarsm/QwikLabs-GCP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIAM Custom Roles.txt
29 lines (21 loc) · 1.09 KB
/
IAM Custom Roles.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
gcloud auth list
gcloud config list project
gcloud iam list-testable-permissions //cloudresourcemanager.googleapis.com/projects/$DEVSHELL_PROJECT_ID
gcloud iam roles describe roles/editor
gcloud iam list-grantable-roles //cloudresourcemanager.googleapis.com/projects/$DEVSHELL_PROJECT_ID
nano role-definition.yaml
gcloud iam roles create viewer --project $DEVSHELL_PROJECT_ID \
--title "Role Viewer" --description "Custom role description." \
--permissions compute.instances.get,compute.instances.list --stage ALPHA
gcloud iam roles list --project $DEVSHELL_PROJECT_ID
gcloud iam roles list
gcloud iam roles describe editor --project $DEVSHELL_PROJECT_ID
nano new-role-definition.yaml
gcloud iam roles update editor --project $DEVSHELL_PROJECT_ID \
--file new-role-definition.yaml
gcloud iam roles update viewer --project $DEVSHELL_PROJECT_ID \
--add-permissions storage.buckets.get,storage.buckets.list
gcloud iam roles update viewer --project $DEVSHELL_PROJECT_ID \
--stage DISABLED
gcloud iam roles delete viewer --project $DEVSHELL_PROJECT_ID
gcloud iam roles undelete viewer --project $DEVSHELL_PROJECT_ID