How to use custom domain Azure Private DNS while I am using Azure Flexible postgres Server which forces a certain domain name.

Sandeep Goyal 40 Reputation points
2024-01-19T20:31:54.06+00:00

I need to host an application that will have five VMs and one Postgres flexible server(in the same vnet) using a delegated subnet. Now, the Postgres flexible server with delegated subnet mandatorily needs an Azure private DNS zone with the domain "wdts.postgres.database.azure.com". My application VMs need to use a different domain say, xyz.com, but I cannot have a record in an already created DNS zone with xyz.com and a single VNET can have only one private DNS zone. So, what could be the solution to use a custom domain for search while using Azure private DNS already having a different domain

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
603 questions
{count} votes

Accepted answer
  1. Luis Arias 5,131 Reputation points
    2024-01-19T21:58:43.35+00:00

    Hi Sandeep Goyal,

    You can continue using your existing custom domain name and also include the private dns zone for postgress dns that is required in the private endpoint configuration so the configuration will looks like:

    • xyz.com (Your custom domain) --> ips_vms_vms
    • privatelink.postgres.cosmos.azure.com(Postgress domain) --> ip_pe_postgress

    https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-dns

    About "single VNET can have only one private DNS zone." the documentation refeer to the creation of the link itself However the vnet can be associated to multiple private dns zone by the private dns zone link.

    You can create only one link between a private DNS zone and a virtual network.https://learn.microsoft.com/en-us/azure/dns/private-dns-virtual-network-links

    So you can continue using your exiting domain for you application and also add the private dns zone configuration as is required by private endpoint configuration on postgres. Let me know if you have more doubts,

    Luis

    0 comments No comments

0 additional answers

Sort by: Most helpful