diff --git a/blueprints/networking/ha-vpn-over-interconnect/README.md b/blueprints/networking/ha-vpn-over-interconnect/README.md index e2bab6e188..460cade6e8 100644 --- a/blueprints/networking/ha-vpn-over-interconnect/README.md +++ b/blueprints/networking/ha-vpn-over-interconnect/README.md @@ -24,26 +24,22 @@ A single pre-existing project and a VPC is used in this blueprint to keep variab The provided project needs a valid billing account and the Compute APIs enabled. The two Dedicated Interconnect connections should already exist, either in the same project or in any other project belonging to the same GCP Organization. - - - ## Variables | name | description | type | required | default | |---|---|:---:|:---:|:---:| | [network](variables.tf#L18) | The VPC name to which resources are associated to. | string | ✓ | | -| [overlay_config](variables.tf#L24) | Configuration for the overlay resources. | object({…}) | ✓ | | -| [project_id](variables.tf#L66) | The project id. | string | ✓ | | -| [region](variables.tf#L71) | GCP Region. | string | ✓ | | -| [underlay_config](variables.tf#L76) | Configuration for the underlay resources. | object({…}) | ✓ | | +| [overlay_config](variables.tf#L24) | Configuration for the overlay resources. | object({…}) | ✓ | | +| [project_id](variables.tf#L63) | The project id. | string | ✓ | | +| [region](variables.tf#L68) | GCP Region. | string | ✓ | | +| [underlay_config](variables.tf#L73) | Configuration for the underlay resources. | object({…}) | ✓ | | ## Outputs | name | description | sensitive | |---|---|:---:| | [underlay](outputs.tf#L17) | Setup for the underlay connection. | | - ## Test @@ -64,9 +60,7 @@ module "test" { } } } - onprem_vpn_gateway = { - interfaces = ["172.16.0.1", "172.16.0.2"] - } + onprem_vpn_gateway_interfaces = ["172.16.0.1", "172.16.0.2"] gateways = { a = { remote-0 = { diff --git a/blueprints/networking/ha-vpn-over-interconnect/overlay.tf b/blueprints/networking/ha-vpn-over-interconnect/overlay.tf index 4ded55ded4..7a9d9e1fe5 100644 --- a/blueprints/networking/ha-vpn-over-interconnect/overlay.tf +++ b/blueprints/networking/ha-vpn-over-interconnect/overlay.tf @@ -47,9 +47,9 @@ resource "google_compute_external_vpn_gateway" "default" { name = "peer-vpn-gateway" project = var.project_id description = "Peer IPSec over Interconnect VPN gateway" - redundancy_type = length(var.overlay_config.onprem_vpn_gateway) == 2 ? "TWO_IPS_REDUNDANCY" : "SINGLE_IP_INTERNALLY_REDUNDANT" + redundancy_type = length(var.overlay_config.onprem_vpn_gateway_interfaces) == 2 ? "TWO_IPS_REDUNDANCY" : "SINGLE_IP_INTERNALLY_REDUNDANT" dynamic "interface" { - for_each = var.overlay_config.onprem_vpn_gateway.interfaces + for_each = var.overlay_config.onprem_vpn_gateway_interfaces content { id = interface.key ip_address = interface.value diff --git a/blueprints/networking/ha-vpn-over-interconnect/variables.tf b/blueprints/networking/ha-vpn-over-interconnect/variables.tf index 196ef26956..ee676b3994 100644 --- a/blueprints/networking/ha-vpn-over-interconnect/variables.tf +++ b/blueprints/networking/ha-vpn-over-interconnect/variables.tf @@ -33,10 +33,7 @@ variable "overlay_config" { ip_ranges = map(string) })) }) - onprem_vpn_gateway = object({ - redundancy_type = optional(string, "TWO_IPS_REDUNDANCY") - interfaces = list(string) - }) + onprem_vpn_gateway_interfaces = list(string) gateways = map(map(object({ bgp_peer = object({ address = string