An Azure managed PostgreSQL database service for app development and deployment.
Hi @Paul Donovan
You are correct that an existing Azure Database for PostgreSQL Flexible Server cannot be moved from Public access to Private access (VNet integration) in-place. Microsoft currently documents that moving a Flexible Server in or out of a virtual network isn't supported.
However, there is an important alternative that may avoid a database migration altogether: Private Link / Private Endpoint.
For a server originally deployed with Public access, you can create a Private Endpoint for the existing Flexible Server in a subnet of your VNet. The Private Endpoint provides a private IP in your VNet, and clients in the VNet, peered VNets, or connected on-premises networks can access the PostgreSQL server through that private endpoint.
The current networking model explicitly supports:
- Public-access Flexible Server + Private Endpoint
- Multiple Private Endpoints for the same server
- Private connectivity from VNets/peered VNets/on-premises
- Disabling public network access after the Private Endpoint is configured, if public connectivity is no longer required
So, if the requirement is "make the existing production PostgreSQL server privately reachable from our VNet", you do not necessarily need to create a second server and perform a database migration.
A typical approach would be:
- Create a suitable subnet for Private Endpoints in the target VNet.
- Create a Private Endpoint targeting the existing PostgreSQL Flexible Server.
- Configure the appropriate Private DNS zone and VNet links so that the normal
*.postgres.database.azure.comFQDN resolves to the private endpoint. - Test application connectivity through the private endpoint.
- Once connectivity is confirmed, disable public network access on the PostgreSQL server if you want to eliminate public connectivity. Microsoft documents that disabling public access leaves connectivity through Private Endpoints.
This is different from Private access (VNet integration): the PostgreSQL server itself remains a public-access deployment, while Private Link provides private connectivity to it. Microsoft currently lists these as separate networking options.
Therefore, for the eight production servers, I would first evaluate Private Endpoint/Private Link rather than performing eight pg_dump/restore migrations.
If the actual requirement is specifically VNet integration/VNet injection (i.e., the PostgreSQL server itself must be deployed into a delegated VNet subnet), then there is currently no supported in-place conversion from public access to VNet integration. In that case, a migration to a newly created private-access Flexible Server is required.
Microsoft documentation: PostgreSQL Flexible Server networking overview Private Link for PostgreSQL Flexible Server Add a Private Endpoint to PostgreSQL Flexible Server