Unable to connect to Postgres Flexible server with vnet integration

Parag Pratyush Roy 5 Reputation points
2023-04-19T21:44:19.3366667+00:00

On creation of a flexible server with vnet integration, I am unable to connect to the server through psql using the server fqdn. To connect I created a VM in the same Vnet as the flex server. The error I get is " Could not translate Command used to connect:
psql "host=mytest12.postgres.database.azure.com port=5432 dbname=mytestdb17 user=postgresAdmin password=*** sslmode=require" The error I get is "psql: error: could not translate host name "mytest12.postgres.database.azure.com" to address: Name or service not known" I used the below link as a resource:
https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/quickstart-create-connect-server-vnet

Azure Database for PostgreSQL
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.