We have created the Vnet with virtual network gateway for point to site VPN, PostgresDB, Azure function APP.
We are able to establish connections with a point-to-site VPN.
Configuration:
- Resources configuration in Azure functions:- Private endpoint and vnet integration.
- Resources configuration in PostgresDB:- Private endpoint and in connection security set Deny public network access to "Yes"
If in PostgresDB we configured Deny public network to "No" then azure function communicating to Postgres DB and works find.
Issue :
when we are trying to access Azure DB from Private function with hostname its failed to establish the connection but it works if we replace Azure DB hostname with private IP.
Same with VPN connection when we try to connect Postgress DB with server name it doesn't work but works with private endpoint IP.
Error:-
Result: Failure Exception: OperationalError: FATAL: The public network access on this server is disabled. To connect to this server, use the Private Endpoint from inside your virtual network.
we need a solution to create a connection between the azure function to private Postgres DB.