Change private DNS zone
Azure Private DNS provides a reliable and secure DNS service for your virtual network. Azure Private DNS manages and resolves domain names in the virtual network, without the need to configure a custom DNS solution.
When you deploy an Azure Database for PostgreSQL flexible server with Networking with private access (VNET Integration) mode, you're required to provide the private DNS zone in which is mandatory to be able to do DNS resolution. For new Azure Database for PostgreSQL flexible server creation by using private network access, Private DNS zones need to be used while you configure Azure Database for PostgreSQL flexible servers with private access.
On existing servers, you can change the private DNS zone from the one that you provided during server creation, to another one that exists already and that can be on any resource group of any subscription to which you have access.
Using the Azure portal:
Select your Azure Database for PostgreSQL flexible server.
In the resource menu, select Overview.
The status of the server must be Available, for the Networking menu option to be enabled.
If the status of the server isn't Available, the Networking option is disabled.
Note
Any attempt to configure the networking settings of a server whose status is other than available, would fail with an error.
In the resource menu, select Networking.
The only network related modifiable setting for servers deployed with Private access (VNET Integration) is the private DNS zone in which the server is integrated. To change it, in the Private DNS integration section, expand the Subscription and Private DNS zone comboboxes to select an existing private DNS zone in which you want to integrate your server.
If the selected private DNS zone isn't linked to the virtual network in which your server is injected, you can see the Link private DNS zone to your virtual network checkbox. It's selected by default, and that means that the selected private DNS zone will be linked to the virtual network of your server. By clearing the checkbox, you're deciding to not link that private DNS zone to the virtual network of your server. As a consequence, none of the hosts in that virtual network wouldn't be able to resolve the name of your server using the A record persisted by the server in that private zone.
Note
If you select Link private DNS zone to your virtual network