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

  1. From the Azure portal, go to the VNet for which you want to add service endpoints.
  2. From the menu in the left pane, select Service endpoints.
  3. In the Service endpoints window, click the + Add button.
  4. 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
  5. 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"
                    }
                ]
            }
        }
    ]