In Google Cloud Platform, how do I set up private DNS Peering between two VPCs that are connected with VPC Peering, but reside in the same project?
I have one project my-project
and two VPC networks: blue
and pink
. The two VPCs are peered. I want VMs on blue
to be able to reach VMs on pink
by their internal name, such as pink-vm.us-west1-b.c.my-project.internal
, and vice versa.
If I set up 1 private DNS Peering zone for my-project.internal
on the pink
network and peer it to the blue
network, I can reach instances on blue
by name from pink
. Success! But I still cannot reach instances on pink
from blue
.
Now, if I set up a second DNS Peering zone on the blue network (also set to my-project.internal
), nothing works anymore. I get the following error when I try to ping:
me@blue-vm$ ping pink-vm.us-west1-b.c.my-project.internal
ping: pink-vm.us-west1-b.c.my-project.internal: Temporary failure in name resolution
It seems like the 2 reciprocal DNS Peering zones can't work together. They are peering blue
to pink
and pink
to blue
each under the domain my-project.internal
. How can I make it so that my peered VPCs in the same project can resolve names in each other's network?