Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create a virtual machine instance in GCP using the correct command.
GCP
gcloud compute instances create my-instance --zone=[1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using an invalid or misspelled zone name.
✗ Incorrect
The zone europe-west1-b is a valid GCP zone for creating instances.
2fill in blank
mediumComplete the code to list all storage buckets in your GCP project.
GCP
gsutil [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'mb' which creates a bucket instead of listing.
✗ Incorrect
The command gsutil ls lists all storage buckets in your project.
3fill in blank
hardFix the error in the command to deploy an app to App Engine.
GCP
gcloud app deploy [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect file names like app.yml or deploy.yaml.
✗ Incorrect
The correct configuration file for App Engine deployment is app.yaml.
4fill in blank
hardFill both blanks to create a firewall rule allowing HTTP traffic on port 80.
GCP
gcloud compute firewall-rules create allow-http --allow=[1]:[2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using UDP protocol or wrong port numbers like 443.
✗ Incorrect
HTTP traffic uses TCP protocol on port 80, so the rule must allow tcp:80.
5fill in blank
hardFill all three blanks to create a GCP Pub/Sub topic and publish a message.
GCP
gcloud pubsub topics create [1] gcloud pubsub topics publish [2] --message=[3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using different topic names or missing quotes around the message.
✗ Incorrect
The topic name must be consistent when creating and publishing. The message is a string like "Hello, GCP!".