Fix Azure Virtual Network Service Endpoint Errors
When working with Azure Virtual Network, you may encounter a configuration error that prevents your deployment from working. This guide explains the most common mistake with service endpoint and shows the exact fix.
A Common Mistake
Not using service endpoints for PaaS services, forcing traffic to Azure Storage/SQL to go over the public internet instead of the Azure backbone.
The incorrect command:
# No service endpoint
az storage account create --name mystorage --resource-group my-rg --default-action Deny
az storage account network-rule add --account-name mystorage --ip-address 203.0.113.0/24
Error output:
Storage account configured with public IP allowlist.
Traffic from VNet egresses to the internet via the public IP. Latency is higher. Traffic is not encrypted on the Azure backbone. Public IP allowlist management is cumbersome.
The Correct Approach
The right way to configure service endpoint in Azure Virtual Network:
az network vnet subnet update --name my-subnet --resource-group my-rg --vnet-name my-vnet --service-endpoints Microsoft.Storage
az storage account network-rule add --account-name mystorage --resource-group my-rg --vnet-name my-vnet --subnet my-subnet
Successful result:
Service endpoint configured.
Traffic from the subnet to Storage stays on the Azure backbone. Lower latency, higher security. No public internet exposure. Access is restricted to the specific subnet.
How to Prevent This
Enable service endpoints for: Storage, SQL, Key Vault, Cosmos DB, Service Bus, Event Hubs. Service endpoints provide direct connectivity from VNet to PaaS services. Endpoints use the Azure backbone, not the internet. For complete isolation, use Private Link instead.
FAQ
Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro. Secure your cloud with DodaTech.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro