azureazure-private-linkazure-private-dnsazure-private-dns-zone

Can we assign a virtual network with multiple private dns zone namespaces as virtual link?


Can we assign a virtual network with multiple private DNS zone namespaces as virtual links?

I have a virtual network privateEndpoint-VNet that needs to be added as a virtual link with multiple private DNS zones each one having the same namespace privatelink.blob.core.windows.net in different resource groups and if I tried to add it while creating a private endpoint with Integrated private DNS zone option selected, I get below error

"A virtual network cannot be linked to multiple zones with overlapping namespaces. 
You tried to link virtual network with 'privatelink.blob.core.windows.net' and 'privatelink.blob.core.windows.net' zones.".

if we can't assign a virtual network with multiple private DNS zones each having the same namespace as virtual links, how can we resolve the above error message?

Our requirement is as such we need resources of privateEndpoint-VNet to connect with all managed storage account services in all resource groups privately.


Solution

  • You cannot assign many DNS zones with the same namespace to the single VNET. The proper way of managing DNS zones it to have single DNS zone namespace and assign it (link) to multiple VNETs.

    For example:

    Let's say you have 2 storage accounts. Storage accounts are in different VNETs. You create a single Private DNS zone privatelink.blob.core.windows.net in your environment. The valid solution would be to link your private DNS zone to every VNET that needs to be able to solve hostnames in that zone. Both of the storage accounts would register (or would be added manually if there is already a different zone with auto-registration enabled) against that single DNS zone and their hostname would be resolvable for all resources in linked VNETs.