Complete the code to specify the primary region for a multi-region Cloud Storage bucket.
resource "google_storage_bucket" "multi_region_bucket" { name = "my-multi-region-bucket" location = "[1]" storage_class = "MULTI_REGIONAL" }
The location for a multi-region bucket must be a multi-region name like us, not a single region like us-central1.
Complete the code to create a global load balancer forwarding rule for multi-region traffic.
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" }
The target field requires the full self_link of the target HTTP proxy resource.
Fix the error in the backend service configuration for multi-region failover.
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 } }
The health_checks field expects a list of full resource URLs, so use self_link.
Fill both blanks to configure a Cloud DNS managed zone with geo-routing for multi-region traffic.
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" } }
The geo_routing_policy block configures routing by region, and inside it, the region specifies the target region.
Fill all three blanks to define a multi-region Cloud Spanner instance with regional configurations.
resource "google_spanner_instance" "multi_region_instance" { name = "multi-region-instance" config = "[1]" display_name = "Multi Region Instance" nodes = [2] labels = { environment = "[3]" } }
The config for multi-region Cloud Spanner is typically a multi-region config like nam-multi-region. The nodes should be a number like 5 for capacity. The environment label is set to 'prod' for production.