Files
hunfabric/modules/api-gateway/recipe-multi-region
2026-04-18 10:07:14 +02:00
..
2026-04-18 10:07:14 +02:00
2025-10-24 13:11:17 +02:00
2026-04-18 10:07:14 +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