By peering the networks you allow communication to the Private Endpoint, however to resolve the name you will need to link the Private DNS zone that has your Private Endpoint DNS records in it, to both vNets.
How to connect an app service with private endpoint and cosmos db with private endpoint in different Vnet
I have 2 Vnets :
Vnet1 ="cosmos-db-vnet" with "private_subnet" in which the cosmos-db and its private endpoint are created
Vnet2 ="client-vnet" with "private_subnet" in which the app service and its private endpoint are created and another subnet "subnet_out" for Vnet integration of the app service
I have enabled Vnet peering between the two vnets but my java code running inside the the app service can't connect to the mongo db I get a read timeout
I guess the problem is the app sends traffic through the subnet_out with a certain ip and the cosmos respond at the same
I want some helpful thoughts that I can implement
1 answer
Sort by: Most helpful
-
Sam Cogan 10,807 Reputation points Microsoft Employee
2023-08-03T07:43:52.73+00:00