From 2b96d1110b75ddf6b38186b14e8d745f7a05e39d Mon Sep 17 00:00:00 2001 From: badra001 Date: Mon, 3 May 2021 11:50:54 -0400 Subject: [PATCH] force dynamic routing --- vpn/main.tf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vpn/main.tf b/vpn/main.tf index 57e7c25..74b1386 100644 --- a/vpn/main.tf +++ b/vpn/main.tf @@ -68,7 +68,7 @@ resource "aws_vpn_gateway" "vpn" { } resource "aws_vpn_gateway_attachment" "vpn" { - vpc_id = aws_vpc.vpc.id + vpc_id = var.vpc_id vpn_gateway_id = aws_vpn_gateway.vpn.id } @@ -100,6 +100,7 @@ resource "random_string" "tunnel_preshared_key" { #--- # vpn connection, one per vpn endpoint +# at this time, static routing is not an option. We can re-code this later if needed #--- resource "aws_vpn_connection" "vpn" { for_each = local.vpn_settings @@ -108,7 +109,8 @@ resource "aws_vpn_connection" "vpn" { customer_gateway_id = aws_customer_gateway.vpn[each.key].id tunnel1_preshared_key = random_string.tunnel_preshared_key[each.key].result tunnel2_preshared_key = random_string.tunnel_preshared_key[each.key].result - static_routes_only = var.vpc_vpn_dynamic_routing ? false : true + # static_routes_only = var.vpc_vpn_dynamic_routing ? false : true + static_routes_only = false tags = merge( local.base_tags,