title | description | author | ms.author | ms.service | ms.custom | ms.topic | ms.date |
---|---|---|---|---|---|---|---|
Integrate Azure Database for PostgreSQL with Service Connector |
Integrate Azure Database for PostgreSQL into your application with Service Connector |
shizn |
xshi |
service-connector |
event-tier1-build-2022 |
how-to |
05/03/2022 |
This page shows the supported authentication types and client types of Azure Database for PostgreSQL using Service Connector. You might still be able to connect to Azure Database for PostgreSQL in other programming languages without using Service Connector. This page also shows default environment variable names and values (or Spring Boot configuration) you get when you create the service connection. You can learn more about Service Connector environment variable naming convention.
- Azure App Service
- Azure Spring Cloud
Secret/ConnectionString
Default environment variable name | Description | Example value |
---|---|---|
AZURE_POSTGRESQL_CONNECTIONSTRING | ADO.NET PostgreSQL connection string | Server={your-postgres-server-name}.postgres.database.azure.com;Database={database-name};Port=5432;Ssl Mode=Require;User Id={username}@{servername};Password=****; |
Secret/ConnectionString
Default environment variable name | Description | Example value |
---|---|---|
AZURE_POSTGRESQL_CONNECTIONSTRING | JDBC PostgreSQL connection string | jdbc:postgresql://{your-postgres-server-name}.postgres.database.azure.com:5432/{database-name}?sslmode=require&user={username}%40{servername}l&password=**** |
Secret/ConnectionString
Application properties | Description | Example value |
---|---|---|
spring.datatsource.url | Database URL | jdbc:postgresql://{your-postgres-server-name}.postgres.database.azure.com:5432/{database-name}?sslmode=require |
spring.datatsource.username | Database username | {username}@{servername} |
spring.datatsource.password | Database password | **** |
Secret/ConnectionString
Default environment variable name | Description | Example value |
---|---|---|
AZURE_POSTGRESQL_HOST | Database host URL | {your-postgres-server-name}.postgres.database.azure.com |
AZURE_POSTGRESQL_USER | Database username | {username}@{servername} |
AZURE_POSTGRESQL_PASSWORD | Database password | **** |
AZURE_POSTGRESQL_DATABASE | Database name | {database-name} |
AZURE_POSTGRESQL_PORT | Port number | 5432 |
AZURE_POSTGRESQL_SSL | SSL option | true |
Secret/ConnectionString
Default environment variable name | Description | Example value |
---|---|---|
AZURE_POSTGRESQL_CONNECTIONSTRING | psycopg2 connection string | dbname={database-name} host={your-postgres-server-name}.postgres.database.azure.com port=5432 sslmode=require user={username}@{servername} password=**** |
Secret/ConnectionString
Default environment variable name | Description | Example value |
---|---|---|
AZURE_POSTGRESQL_HOST | Database host URL | {your-postgres-server-name}.postgres.database.azure.com |
AZURE_POSTGRESQL_USER | Database username | {username}@{servername} |
AZURE_POSTGRESQL_PASSWORD | Database password | **** |
AZURE_POSTGRESQL_NAME | Database name | {database-name} |
Secret/ConnectionString
Default environment variable name | Description | Example value |
---|---|---|
AZURE_POSTGRESQL_CONNECTIONSTRING | Go pg connection string | host={your-postgres-server-name}.postgres.database.azure.com dbname={database-name} sslmode=require user={username}@{servername} password=**** |
Secret/ConnectionString
Default environment variable name | Description | Example value |
---|---|---|
AZURE_POSTGRESQL_CONNECTIONSTRING | PHP native postgres connection string | host={your-postgres-server-name}.postgres.database.azure.com port=5432 dbname={database-name} sslmode=requrie user={username}@{servername} password=**** |
Secret/ConnectionString
Default environment variable name | Description | Example value |
---|---|---|
AZURE_POSTGRESQL_CONNECTIONSTRING | Ruby pg connection string | host={your-postgres-server-name}.postgres.database.azure.com port=5432 dbname={database-name} sslmode=require user={username}@{servername} password=**** |
Follow the tutorials listed below to learn more about Service Connector.
[!div class="nextstepaction"] Learn about Service Connector concepts