Files
hunfabric/modules/api-gateway/recipe-multi-region
Liam Nesteroff f07e4f64e9 Standardise reuse variable from project module and implement for net-vpc (#3205)
* exposing the network_id from the net-vpc module for use with tag bindings

* convert vpc_create to vpc_reuse

* Changed the reuse vars to standardised attributes

* fixed readme tests and schemas

* modified apigee blueprint to use vpc_reuse with network_id passthrough

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2025-07-03 09:12:05 +10: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=43