Search code examples
azureazure-virtual-network

How to integrate 2 app services into the same vNet


I have two app services that i want to allow inbound calls only from my vNet. I am able to create a private endpoint and its private dns zone for the first one and it is working. But when i do it for the second one the portal wants me to use the same private dns zone. I cannot choose a different private zone! And if i configure the my second private endpoint through the portal by adding the configuration that links to that second private zone it is getting missconfigured! Im really stuck in this. My questions are, first Is it possible to integrate two app services into the same vNet? Second, how can i configure the second private endpoint to be able to work correctly?

Big Thanks to any advice!

I Tried everything to configure that through the azure portal with no luck!


Solution

  • I tried to reproduce the same in my environment like below:

    I created two app services to allow inbound calls vNet like below:

    App service 1

    enter image description here

    App service 2

    enter image description here

    I added outbound traffic of vnet integration like below

    enter image description here

    I try the same to add my private endpoint with app service 1 it configure successfully with private DNS zone like below:

    enter image description here

    When I try to add another app service with private endpoint it associates with same private DNS zone only.

    enter image description here

    Note that: It is not possible to add second private DNS zone within the resource group even I try to add different vnet integration with another app service it associate with same private DNS zone only

    Check this similar thread As suggested by Cloudkollektiv you can make use of service endpoint it is similar to private endpoint. It enables private IP addresses in the VNet to reach the endpoint of an Azure service without need for a public IP address on the VNet.

    Reference:

    Integrate your app with an Azure virtual network - Azure App Service | Microsoft Learn