Set up service endpoints for a network

On Azure, the external postgres database can reach the network via service endpoints. 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

  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.
  6. 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"
                        }
                    ]
                }
            }
        ]