0
0
GCPcloud~10 mins

Default VPC and subnets 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 list the default VPC network in a GCP project.

GCP
gcloud compute networks describe [1] --project=my-project
Drag options to blanks, or click blank then click option'
Acustom-network
Bdefault
Cvpc-1
Dmain-network
Attempts:
3 left
💡 Hint
Common Mistakes
Using a custom network name instead of 'default'.
Confusing the default VPC with other network names.
2fill in blank
medium

Complete the command to list all subnets in the default VPC.

GCP
gcloud compute networks subnets list --network=[1] --project=my-project
Drag options to blanks, or click blank then click option'
Adefault
Bcustom-network
Cvpc-2
Dmain-subnet
Attempts:
3 left
💡 Hint
Common Mistakes
Using a subnet name instead of the network name.
Using a custom network name.
3fill in blank
hard

Fix the error in the command to create a subnet in the default VPC.

GCP
gcloud compute networks subnets create my-subnet --network=[1] --region=us-central1 --range=10.128.0.0/20
Drag options to blanks, or click blank then click option'
Adefault
Bcustom-network
Cvpc-3
Dmain-network
Attempts:
3 left
💡 Hint
Common Mistakes
Using a non-existent network name.
Omitting the network parameter.
4fill in blank
hard

Fill both blanks to describe the default subnet in the us-central1 region.

GCP
gcloud compute networks subnets describe [1] --region=[2] --project=my-project
Drag options to blanks, or click blank then click option'
Adefault
Bus-central1
Ccustom-subnet
Deurope-west1
Attempts:
3 left
💡 Hint
Common Mistakes
Using a custom subnet name instead of 'default'.
Using the wrong region.
5fill in blank
hard

Fill all three blanks to create a firewall rule allowing SSH in the default VPC.

GCP
gcloud compute firewall-rules create [1] --network=[2] --allow=[3] --project=my-project
Drag options to blanks, or click blank then click option'
Aallow-ssh
Bdefault
Ctcp:22
Ddeny-ssh
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'deny-ssh' instead of 'allow-ssh'.
Using the wrong network name.
Incorrect protocol or port.