0
0
GCPcloud~10 mins

Why resource hierarchy matters in GCP - Test Your Understanding

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

Complete the code to specify the parent resource when creating a new project in GCP.

GCP
gcloud projects create my-project --[1]=123456789012
Drag options to blanks, or click blank then click option'
Aorganization
Bparent
Cfolder
Dbilling-account
Attempts:
3 left
💡 Hint
Common Mistakes
Using --folder instead of --organization
Omitting the parent resource flag
Using --billing-account which is unrelated to hierarchy
2fill in blank
medium

Complete the code to list all projects under a specific folder in GCP.

GCP
gcloud projects list --filter='parent.type:folder AND parent.id:[1]'
Drag options to blanks, or click blank then click option'
Amy-folder
Bfolders/123456789012
C123456789012
Dorganizations/123456789012
Attempts:
3 left
💡 Hint
Common Mistakes
Including 'folders/' prefix in the ID
Using organization ID instead of folder ID
Using folder name instead of ID
3fill in blank
hard

Fix the error in the command to set IAM policy on a folder resource.

GCP
gcloud resource-manager folders set-iam-policy [1] policy.yaml
Drag options to blanks, or click blank then click option'
Afolders/123456789012
Bmy-folder
C123456789012
Dorganizations/123456789012
Attempts:
3 left
💡 Hint
Common Mistakes
Using only the numeric ID without prefix
Using organization prefix instead of folder
Using folder name instead of ID
4fill in blank
hard

Fill both blanks to create a folder under an organization with the correct parent and display name.

GCP
gcloud resource-manager folders create --[1]=[2] --display-name="My Folder"
Drag options to blanks, or click blank then click option'
Aparent
Borganization
Corganizations/123456789012
Dfolders/123456789012
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'organization' as the flag name instead of 'parent'
Using numeric ID without prefix as parent value
Using folder prefix as parent value
5fill in blank
hard

Fill all three blanks to assign a project to a folder.

GCP
gcloud projects move [1] --[2]=[3]
Drag options to blanks, or click blank then click option'
Amy-project-123
Bfolder
Cbilling-account
D987654321098
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--billing-account' which is for billing, not hierarchy
Including 'folders/' prefix in the folder ID
Using full resource name instead of numeric ID