0
0
GCPcloud~10 mins

GCP global infrastructure (regions, zones) - Interactive Code Practice

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

Complete the code to specify the GCP region for your resource.

GCP
resource = compute.instances().insert(project=project_id, zone='[1]-a', body=instance_body)
Drag options to blanks, or click blank then click option'
Aus-central1
Beurope-west1
Casia-east1
Dnorthamerica-northeast1
Attempts:
3 left
💡 Hint
Common Mistakes
Using a zone name instead of a region name in the region field.
Mixing up region and zone naming conventions.
2fill in blank
medium

Complete the code to select the correct zone within a region.

GCP
zone = '[1]-b'
Drag options to blanks, or click blank then click option'
Aasia-southeast1
Beurope-west1
Cus-central1
Dsouthamerica-east1
Attempts:
3 left
💡 Hint
Common Mistakes
Using a zone letter without a valid region prefix.
Choosing a region that does not exist.
3fill in blank
hard

Fix the error in the code to correctly specify a zone for a VM instance.

GCP
instance = compute.instances().insert(project=project_id, zone='[1]', body=instance_body)
Drag options to blanks, or click blank then click option'
Aus-central1
Bcentral1-a
Cus-central
Dus-central1-a
Attempts:
3 left
💡 Hint
Common Mistakes
Using only the region name without the zone letter.
Using incomplete or incorrect region names.
4fill in blank
hard

Fill both blanks to create a dictionary mapping regions to their zones.

GCP
region_zones = {'us-east1': ['[1]', '[2]']}
Drag options to blanks, or click blank then click option'
Aus-east1-b
Bus-east1-c
Cus-east1-d
Dus-east1-e
Attempts:
3 left
💡 Hint
Common Mistakes
Using zone letters that do not exist in the region.
Mixing zones from different regions.
5fill in blank
hard

Fill all three blanks to define a list of zones for the 'europe-west3' region.

GCP
zones = ['[1]', '[2]', '[3]']
Drag options to blanks, or click blank then click option'
Aeurope-west3-a
Beurope-west3-b
Ceurope-west3-c
Deurope-west3-d
Attempts:
3 left
💡 Hint
Common Mistakes
Using zones from other regions.
Repeating the same zone letter.