Hi have 3 google projects hub,spoke-1 and spoke-2.
- hub and spoke-1 are connected via HA VPN
- spoke-1 and spoke-2 are connected via VPC peering
can vm’s from hub connect to vm’s on spoke-2 project?
can vm’s from hub connect to vm’s on spoke-2 project?
That should work - as long as you don’t have any overlapping subnets.
Out of interest, what causes the need for the VPN connection - as opposed to simply Peering VPCs directly to the hub? or perhaps using a Shared VPC?
Thanks Alex for the reply. I will be using aws/azure in place of hub project.
By default it will not work however if i add custom routes of vpc-spoke2 in cloud router of vpc-spoke-1, we can connect VM’s from hub to spoke-2.
is this correct by design?
That’s correct, take a look at this entry in the docs:
I don’t think it applies in your case, but one thing to also keep in mind that some IP ranges won’t come across the peering by default, this table gives some guidance:
https://cloud.google.com/vpc/docs/vpc-peering#subnet-route-exchange