0
0
GCPcloud~10 mins

Compute commands (instances, disks) in GCP - Interactive Code Practice

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

Complete the command to list all Compute Engine instances in the current project.

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

Complete the command to create a new persistent disk named 'my-disk' of size 100GB in zone us-central1-a.

GCP
gcloud compute disks create my-disk --size=[1] --zone=us-central1-a
Drag options to blanks, or click blank then click option'
A100GB
B1TB
C10GB
D50GB
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the unit 'GB' causes errors.
Using a smaller size than requested.
3fill in blank
hard

Fix the error in the command to start an instance named 'web-server' in zone us-east1-b.

GCP
gcloud compute instances [1] web-server --zone=us-east1-b
Drag options to blanks, or click blank then click option'
Astop
Bcreate
Cdelete
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'stop' will turn off the instance.
Using 'delete' removes the instance permanently.
4fill in blank
hard

Fill both blanks to create a new instance named 'app-server' in zone us-west1-b with machine type n1-standard-1.

GCP
gcloud compute instances [1] app-server --zone=[2] --machine-type=n1-standard-1
Drag options to blanks, or click blank then click option'
Acreate
Bdelete
Cus-west1-b
Dus-central1-a
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'delete' instead of 'create'.
Specifying the wrong zone.
5fill in blank
hard

Fill all three blanks to attach a disk named 'data-disk' to instance 'db-server' in zone us-east1-c with device name 'data1'.

GCP
gcloud compute instances [1] db-server --zone=[2] --disk=[3] --device-name=data1
Drag options to blanks, or click blank then click option'
Aattach-disk
Bus-east1-c
Cdata-disk
Ddetach-disk
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'detach-disk' instead of 'attach-disk'.
Wrong zone or disk name.