The building blocks
| Piece | What it is | ShopKart example |
|---|---|---|
| Virtual network (VNet) | Your private network in Azure, with an address range | vnet-shopkart-dev, 10.20.0.0/16 |
| Subnet | A slice of the VNet for a purpose | snet-private-endpoints 10.20.1.0/24, snet-databricks-host |
| Private endpoint | A private IP for one service sub-resource | pe-lake-dfs β the lake's dfs endpoint |
| Private DNS zone | Resolves service names to private IPs inside linked VNets | privatelink.dfs.core.windows.net |
| Firewall / NSG | Allow or deny traffic | Storage: public network access disabled |
β‘Databricks in the VNet
Calls stshopkartdev.dfs.core.windows.net
πPrivate DNS
Name β 10.20.1.4 (private IP)
πPrivate endpoint
Traffic stays on Microsoft's network
ποΈADLS Gen2
Public access disabled
Private networking as code
// Private networking for the lake: a VNet, a private endpoint, and private DNS.
param location string = resourceGroup().location
param storageAccountId string // the lake from main.bicep
resource vnet 'Microsoft.Network/virtualNetworks@2024-01-01' = {
name: 'vnet-shopkart-dev'
location: location
properties: {
addressSpace: { addressPrefixes: ['10.20.0.0/16'] }
subnets: [
{ name: 'snet-private-endpoints', properties: { addressPrefix: '10.20.1.0/24' } }
{ name: 'snet-databricks-host', properties: { addressPrefix: '10.20.2.0/24' } }
]
}
}
resource dfsDns 'Microsoft.Network/privateDnsZones@2020-06-01' = {
name: 'privatelink.dfs.${environment().suffixes.storage}' // privatelink.dfs.core.windows.net
location: 'global'
}
resource dnsLink 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2020-06-01' = {
parent: dfsDns
name: 'link-vnet-shopkart-dev'
location: 'global'
properties: { virtualNetwork: { id: vnet.id }, registrationEnabled: false }
}
resource lakeEndpoint 'Microsoft.Network/privateEndpoints@2024-01-01' = {
name: 'pe-lake-dfs'
location: location
properties: {
subnet: { id: vnet.properties.subnets[0].id }
privateLinkServiceConnections: [
{
name: 'lake-dfs'
properties: { privateLinkServiceId: storageAccountId, groupIds: ['dfs'] } // the ADLS Gen2 endpoint
}
]
}
}
resource dnsGroup 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2024-01-01' = {
parent: lakeEndpoint
name: 'default'
properties: {
privateDnsZoneConfigs: [ { name: 'dfs', properties: { privateDnsZoneId: dfsDns.id } } ]
}
}
output privateEndpointId string = lakeEndpoint.idbicep lint network.bicep β no warnings
bicep build network.bicep β 5 resources: virtualNetworks, privateDnsZones, privateDnsZones/virtualNetworkLinks, privateEndpoints, privateEndpoints/privateDnsZoneGroupsNote environment().suffixes.storage instead of hard-coding core.windows.net: the same template then works in Azure Government or China clouds. The DNS zone group automatically creates the DNS record for the endpoint's private IP.
Which endpoint for which service
| Service | groupIds | Private DNS zone |
|---|---|---|
| ADLS Gen2 (Spark, abfss://) | dfs | privatelink.dfs.core.windows.net |
| Blob (SDK, ADF Blob connector) | blob | privatelink.blob.core.windows.net |
| Azure SQL Database | sqlServer | privatelink.database.windows.net |
| Key Vault | vault | privatelink.vaultcore.azure.net |
| Event Hubs | namespace | privatelink.servicebus.windows.net |
Data services in a private network
| Service | How it joins the network |
|---|---|
| Azure Data Factory | Managed VNet integration runtime + managed private endpoints, or a self-hosted IR in your VNet |
| Azure Databricks | VNet injection (clusters in your subnets) + secure cluster connectivity; private link for the workspace |
| Microsoft Fabric | Managed private endpoints and private links at tenant/workspace level |
| Power BI | On-premises data gateway or VNet data gateway to reach private sources |
π― Interview questions on this topic
Try to answer out loud first, then tap to check.
Q1Private endpoint vs service endpoint?1β3 yrs+
Q2Why does a private endpoint connection still go to the public IP?1β3 yrs+
Q3Design network security for an Azure data platform.3+ yrs+
Key takeaways
- βPrivate endpoints + private DNS keep data traffic off the internet.
- βGet DNS right: it's behind most 'it times out' problems.
- βStorage needs both blob and dfs endpoints.
- βDeclare networking in Bicep with the rest of the platform.
Frequently asked questions
What is a private endpoint?
A network interface with a private IP address in your virtual network that connects to one Azure service (like your storage account's dfs endpoint). Traffic stays on Microsoft's network, and you can then disable public access to the service entirely.
Why do private endpoints need private DNS?
Your code still calls stshopkartdev.dfs.core.windows.net. A private DNS zone (privatelink.dfs.core.windows.net) linked to the VNet makes that name resolve to the private IP instead of the public one. Without it, connections go to the public endpoint and fail once public access is off.
Private endpoint or service endpoint?
Service endpoints keep using the service's public IP but allow traffic only from chosen subnets. Private endpoints give the service a private IP in your VNet, work from on-premises over VPN/ExpressRoute, and let you turn public access off. Most enterprises standardise on private endpoints.
How does Data Factory reach private resources?
Use the Azure integration runtime in a managed virtual network with managed private endpoints (Microsoft creates them; the storage owner approves), or a self-hosted integration runtime on a VM inside your network.
π§ Quick check: networking
1. Your company disables public network access on the lake. What must exist for Databricks to read it?
2. Which private DNS zone serves ADLS Gen2's dfs endpoint?
3. groupIds: ['dfs'] in a private endpoint means...
4. ADF needs to copy from a private storage account. Simplest managed option?
Checking your accessβ¦