Set up service endpoints for a network
On Azure, the external postgres database can reach the network via 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.
Steps 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 Data Warehouse)
- Subnets: Select all subnets for which you want to apply the service endpoint
- Service:
- Click Add.
Steps 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"
}
]
}
}
]