Files
hunfabric/modules/api-gateway/recipe-multi-region
Simon Roberts 26dbaa2d6e Enable terraform_naming_convention in tflint (#3930)
* Draft terraform_naming_convention

* Two fast/stages fixes for terraform_naming_convention

* Disable terraform_naming_convention for resources for now

* module fixes for terraform_naming_convention

* tfdoc

* Remove "moved" from recipe and needs-fixing

* Fix moved for spoke_ra

* fix tests

* Use default (snake_case) for resources

* factory.terraform_data.project-preconditions

* First-pass migration of resources + tests

* Fix tests/modules/organization

* Require snake_case for variables; Add annotations for _testing

* permit _fast_debug variable

* Fix net_vpc_factory and net_vpc_firewall tests

* tfdoc addons and recipe

* Fix more tests

* Fix some net-global -> net_global tests

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2026-05-06 06:06:26 +00:00
..
2026-04-18 10:07:14 +02:00
2025-10-24 13:11:17 +02:00

Multi-region deployment for API Gateway

This recipe shows you how to configure an HTTP(S) load balancer to enable multi-region deployments for API Gateway. For more details on how this set up work have a look at the article here.

The diagram below depicts the architecture that this blueprint sets up.

Architecture diagram

Once deployed do the following to see that it works:

  1. Copy the IP address returned as output

  2. Execute the following command:

    curl -k -v https://example.com/hello --resolve example.com:443:<IP_ADDRESS>

Variables

name description type required default
project_id Identifier of the project. string
regions List of regions to deploy the proxy in. list(string)
_testing Populate this variable to avoid triggering the data source. object({…}) null

Outputs

name description sensitive
address LB IP address.

Test

module "test" {
  source     = "./fabric/modules/api-gateway/recipe-multi-region"
  project_id = "project-1"
  regions = [
    "europe-west1",
    "us-central1"
  ]
  _testing = {
    name   = "project-1"
    number = 1234567890
  }
}
# tftest modules=8 resources=47