Service endpoint for Azure Postgres
On Azure, the external PostgreSQL database can reach the network via a service endpoint or a private endpoint. If you would like to use a service endpoint, before you can set up an external database for a given network, you must enable service endpoints for all subnets where the database should be reachable.
Set up a service endpoint via Azure Portal
- From the Azure portal, go to the VNet for which you want to add service endpoints.
- From the menu in the left pane, select Service endpoints.
- In the Service endpoints window, click the + Add button.
- In the pop up window, select:
- Service:
- Microsoft.Sql
- Microsoft Storage (optional: only needed if you are using Cloudera Data Warehouse)
- Subnets: Select all subnets for which you want to apply the service endpoint
- Service:
- Click Add.
Set up a service endpoint via ARM template
If you are using ARM templates to create your infrastructure, you can add the serviceEndpoints section to your template:
For example:
"subnets": [
{
"name": "<YOUR-SUBNET-NAME>",
"properties": {
"addressPrefix": "<YOUR-SUBNET-PREFIX>",
"serviceEndpoints": [
{
"service": "Microsoft.Sql"
},
{
"service": "Microsoft.Storage"
}
]
}
}
]