An Azure managed PostgreSQL database service for app development and deployment.
Hello @JohnSmith-4373
Your understanding is correct. A Microsoft-hosted Azure DevOps agent cannot directly reach an Azure Database for PostgreSQL Flexible Server that is only exposed through a Private Endpoint, because the agent runs outside your VNet and cannot resolve or route to the private IP.
The recommended approach is to use a self-hosted Azure DevOps agent deployed in the same VNet (or a peered VNet) as the PostgreSQL Flexible Server. Ensure:
- The agent has network connectivity to the Private Endpoint.
- Private DNS (privatelink.postgres.database.azure.com) resolves correctly.
- NSGs, firewalls, and routing allow TCP 5432.
If you must use a Microsoft-hosted agent, the database would need to be reachable over a public endpoint (with appropriate firewall restrictions), which defeats the purpose of a Private Link-only deployment.
Microsoft documents that Private Link is intended for clients within connected VNets, making a self-hosted agent the recommended pattern for CI/CD deployments targeting private databases.
Please "Accept the Answer" if this information helped you. This will help us and others in the community as well.