0
0
GCPcloud~10 mins

Custom roles creation in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the role ID when creating a custom role in GCP.

GCP
gcloud iam roles create [1] --project=my-project --title="Custom Role" --permissions=storage.buckets.list
Drag options to blanks, or click blank then click option'
Aroles/customRole1
BmyCustomRole
CcustomRole1
Dcustom-role-1
Attempts:
3 left
💡 Hint
Common Mistakes
Including 'roles/' prefix in the role ID.
Using spaces or special characters in the role ID.
2fill in blank
medium

Complete the code to add permissions when creating a custom role using gcloud.

GCP
gcloud iam roles create customRole2 --project=my-project --title="Custom Role 2" --permissions=[1]
Drag options to blanks, or click blank then click option'
Astorage.buckets.list,storage.objects.get
Bstorage.buckets.list storage.objects.get
C[storage.buckets.list,storage.objects.get]
D"storage.buckets.list,storage.objects.get"
Attempts:
3 left
💡 Hint
Common Mistakes
Using spaces instead of commas between permissions.
Including brackets or quotes around the permissions list.
3fill in blank
hard

Fix the error in the command to update a custom role's title.

GCP
gcloud iam roles update customRole3 --project=my-project --[1]="Updated Role Title"
Drag options to blanks, or click blank then click option'
Aname
Bpermissions
Cdescription
Dtitle
Attempts:
3 left
💡 Hint
Common Mistakes
Using --name instead of --title.
Trying to update permissions with --title flag.
4fill in blank
hard

Fill both blanks to create a custom role with a description and stage set to GA.

GCP
gcloud iam roles create customRole4 --project=my-project --title="Custom Role 4" --description=[1] --stage=[2] --permissions=storage.buckets.list
Drag options to blanks, or click blank then click option'
A"This is a custom role"
BALPHA
CGA
D"Custom role description"
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the description string.
Using the wrong stage like ALPHA instead of GA.
5fill in blank
hard

Fill all three blanks to list all custom roles in a project with a filter for stage GA.

GCP
gcloud iam roles list --project=[1] --filter="stage:[2]" --format=[3]
Drag options to blanks, or click blank then click option'
Amy-project
BGA
Cjson
DcustomRole
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect project ID or role name in --project.
Wrong filter syntax or stage value.
Not specifying output format or using wrong format.