0
0
GCPcloud~10 mins

Multi-region architecture patterns 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 specify the primary region for a multi-region Cloud Storage bucket.

GCP
resource "google_storage_bucket" "multi_region_bucket" {
  name     = "my-multi-region-bucket"
  location = "[1]"
  storage_class = "MULTI_REGIONAL"
}
Drag options to blanks, or click blank then click option'
Aasia-east1
Bus-central1
Cus
Deurope-west1
Attempts:
3 left
💡 Hint
Common Mistakes
Using a single region name instead of a multi-region name for the location.
2fill in blank
medium

Complete the code to create a global load balancer forwarding rule for multi-region traffic.

GCP
resource "google_compute_global_forwarding_rule" "multi_region_lb" {
  name       = "multi-region-lb"
  target     = google_compute_target_http_proxy.http_proxy.[1]
  port_range = "80"
}
Drag options to blanks, or click blank then click option'
Aself_link
Bid
Cname
Durl
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'name' or 'id' instead of 'self_link' for the target field.
3fill in blank
hard

Fix the error in the backend service configuration for multi-region failover.

GCP
resource "google_compute_backend_service" "backend" {
  name                  = "multi-region-backend"
  protocol              = "HTTP"
  health_checks         = [google_compute_health_check.http_check.[1]]
  enable_cdn            = true
  failover_policy {
    disable_connection_draining = false
  }
}
Drag options to blanks, or click blank then click option'
Aname
Bself_link
Cid
Durl
Attempts:
3 left
💡 Hint
Common Mistakes
Referencing health checks by name instead of self_link.
4fill in blank
hard

Fill both blanks to configure a Cloud DNS managed zone with geo-routing for multi-region traffic.

GCP
resource "google_dns_managed_zone" "geo_zone" {
  name        = "geo-zone"
  dns_name    = "example.com."
  description = "Managed zone with geo-routing"
  visibility  = "public"
  [1] = {
    [2] = "us-east1"
  }
}
Drag options to blanks, or click blank then click option'
Ageo_location
Bgeo_routing_policy
Cregion
Dlocation
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect block names like 'geo_location' or 'location' instead of 'geo_routing_policy' and 'region'.
5fill in blank
hard

Fill all three blanks to define a multi-region Cloud Spanner instance with regional configurations.

GCP
resource "google_spanner_instance" "multi_region_instance" {
  name        = "multi-region-instance"
  config      = "[1]"
  display_name = "Multi Region Instance"
  nodes       = [2]
  labels = {
    environment = "[3]"
  }
}
Drag options to blanks, or click blank then click option'
Anam-multi-region
Bregional-us-east1
Cnam-prod
Dregional-us-central1
E3
F5
Gprod
Hdev
Attempts:
3 left
💡 Hint
Common Mistakes
Using single-region configs for multi-region instances.
Setting nodes to too low a number like 3 for production.
Using 'dev' instead of 'prod' for production environment label.