Status Update
Comments
ge...@google.com <ge...@google.com> #2
To solve this problem, create the two routes with different priorities, like this:
Route1: Destination:0.0.0.0/0<-------> Next hop: ILB(IN us-east1) <------> Priority:950
Route2: Destination:0.0.0.0/0<-------> Next Hop: ILB(IN us-west1) <------> Priority:951
As long as the forwarding rules aren't configured to be
From the perspective of us-west1, this route is available:
Route2: Destination:0.0.0.0/0<-------> Next Hop: ILB(IN us-west1) <------> Priority:951
From the perspective of us-east1, this one is available:
Route1: Destination:0.0.0.0/0<-------> Next hop: ILB(IN us-east1) <------> Priority:950
It doesn't matter that these have different priorities in the route table because only one is "active" in each region (as long as global access isn't configured).
Description
What you would like to accomplish:
create a 2 routes as below and would like a way to keep the egress traffic regional
1) Route1:Destination:
2) Route2:Destination:
VPC: same vpc network
traffic from us-east1 instance should go through route 1 only and instance from us-west1 should leave only through route2
Other information (workarounds you have tried, documentation consulted, etc):
1) Create separate VPC and create instances and routes inside that VPC
2) Create Global access behind LB