Update rest of vpn modules to tf1.3

This commit is contained in:
Julio Castillo
2022-11-30 15:19:49 +01:00
parent 620babe5c0
commit e976d71428
8 changed files with 85 additions and 124 deletions

View File

@@ -54,7 +54,7 @@ resource "google_compute_external_vpn_gateway" "external_gateway" {
resource "google_compute_router" "router" {
count = var.router_config.create ? 1 : 0
name = var.router_config.name == null ? "vpn-${var.name}" : var.router_config.name
name = coalesce(var.router_config.name, "vpn-${var.name}")
project = var.project_id
region = var.region
network = var.network
@@ -87,7 +87,7 @@ resource "google_compute_router_peer" "bgp_peer" {
region = var.region
project = var.project_id
name = "${var.name}-${each.key}"
router = local.router
router = coalesce(each.value.router, local.router)
peer_ip_address = each.value.bgp_peer.address
peer_asn = each.value.bgp_peer.asn
advertised_route_priority = each.value.bgp_peer.route_priority