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,