Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a custom network name instead of 'default'.
Confusing the default VPC with other network names.
✗ Incorrect
The default VPC network in GCP is named 'default'.
2fill in blank
mediumComplete 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a subnet name instead of the network name.
Using a custom network name.
✗ Incorrect
The default VPC network is named 'default', so to list its subnets, use --network=default.
3fill in blank
hardFix 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a non-existent network name.
Omitting the network parameter.
✗ Incorrect
To create a subnet in the default VPC, the network must be specified as 'default'.
4fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a custom subnet name instead of 'default'.
Using the wrong region.
✗ Incorrect
The default subnet in the us-central1 region is named 'default' and the region is 'us-central1'.
5fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'deny-ssh' instead of 'allow-ssh'.
Using the wrong network name.
Incorrect protocol or port.
✗ Incorrect
The firewall rule name is 'allow-ssh', network is 'default', and the allowed protocol and port is 'tcp:22'.