I've configured redundant site-to-site VPN between AWS and GCP with 2 VPN connections, 4 tunnels and BGP dynamic routing. Everything works, all good, servers on both sides of the tunnels can reach each-other.
I did that using Terraform and if on GCP side I did configured advertisement of all subnets:
name = "gcp-to-aws-router"
project = google_project.aws_gcp_test.project_id
region = var.gcp_region
network = google_compute_network.gcp_aws_vpc.name
bgp {
asn = var.gcp_bgp_asn
advertise_mode = "CUSTOM"
advertised_groups = ["ALL_SUBNETS"]
}
then on AWS I haven't done anything specific to advertise routes, I have only enabled route propagation on a routing table where my server is located.
I haven't explicitly added any routes nor announces subnets used on both sides of the tunnel by my servers. I've only enabled routing propagation on AWS side.
resource "aws_vpn_gateway_route_propagation" "this" {
vpn_gateway_id = aws_vpn_gateway.aws_vpg.id
route_table_id = aws_route.internet_gw_route.route_table_id
}
In here
the documentation states that:
You can enable route propagation for your route table to automatically propagate your network routes to the table for you.
Nothing about advertisement of local routes to BGP.
I can't understand how how routes from AWS are ending up on GCP side?
How does that work? :)
Thanks a lot!