Debugger
Debugger

Reputation: 792

Azure Private Endpoint for postgresql is not working with multiple Vnet

I have created two vnets (Main APP vnet, Reporting APP vnet both are in same region). My azure postgres database(PAAS) is hosted on main app vnet. I have created two private end point.

  1. First private end point is used for Main App, vnet communication (DB <-> AKS) communication. It's working

  2. Second private end point is created for establishing the database connection to Reporting app vnet. Not working.

I tried also peering the reporting app vnet to main app vnet. peering status showing as connected and second private end point status also in approved status.

But I couldn't able to connect my database using FQDN. I getting the following the error

FATAL: The public network access on this server is disabled. To connect to this server, use the Private Endpoint from inside your virtual network. FATAL: The public network access on this server is disabled. To connect to this server, use the Private Endpoint from inside your virtual network. 

I checked nslookup inside reporting app vnet(inside virtual machine)DNS able to resolve. But I couldn't able to connect it via pgadmin or any app.

Not sure what I'm missing. Anyone please advise me on this

Upvotes: 1

Views: 1440

Answers (1)

RamaraoAdapa
RamaraoAdapa

Reputation: 3119

As you are using private endpoint for PostgreSQL and disabled public access for the PostgreSQL, you can do below configuration:

  • Create private endpoint for PostgreSQL in the vnet1 (Main App VNET)
  • Create peering between vnet1 (Main App VNET) and vnet2 (Reporting App VNET)

Now, you would be able to access the PostgreSQL using the same private endpoint from both the Main App and the Reporting App.

Note: You cannot access the PostgreSQL using the public endpoint since the public access is disabled.

Upvotes: 0

Related Questions