0
0
GCPcloud~10 mins

Why gcloud CLI matters for automation 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 list all Compute Engine instances using gcloud CLI.

GCP
gcloud compute instances [1]
Drag options to blanks, or click blank then click option'
Adelete
Blist
Ccreate
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' instead of 'list' will try to make a new instance.
Using 'delete' will remove instances, which is risky.
2fill in blank
medium

Complete the code to set the default project for gcloud CLI automation.

GCP
gcloud config [1] project my-project-id
Drag options to blanks, or click blank then click option'
Aset
Bget
Cdelete
Dlist
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'get' only reads the current setting.
Using 'delete' removes configuration, which is not desired here.
3fill in blank
hard

Fix the error in the command to create a new Compute Engine instance with automation.

GCP
gcloud compute instances create [1] --zone=us-central1-a
Drag options to blanks, or click blank then click option'
Amy-instance
Binstance
Ccreate-instance
D--instance-name
Attempts:
3 left
💡 Hint
Common Mistakes
Using flags like '--instance-name' in place of the name causes errors.
Using generic words like 'instance' is not a valid name.
4fill in blank
hard

Fill both blanks to automate stopping a Compute Engine instance in a specific zone.

GCP
gcloud compute instances [1] [2] --zone=us-west1-b
Drag options to blanks, or click blank then click option'
Astop
Bmy-instance
Cstart
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' instead of 'stop' will turn the instance on.
Using 'delete' removes the instance permanently.
5fill in blank
hard

Fill all three blanks to automate listing all buckets in a specific project.

GCP
gcloud [1] storage [2] list --project=[3]
Drag options to blanks, or click blank then click option'
Aalpha
Bbuckets
Cmy-project-id
Dbeta
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'alpha' instead of 'beta' may not support all commands.
Using 'objects' instead of 'buckets' lists contents inside buckets, not buckets themselves.