Azure Databricks VNet injection: subnet loses its AVNM IPAM pool allocation (ipamPoolPrefixAllocations) when PrepareNetworkPolicies runs

Lars 0 Reputation points
2026-12-02T09:03:07.2033333+00:00

We deploy VNet-injected Azure Databricks workspaces with Terraform (azurerm provider 5.x). The two delegated subnets (delegation Microsoft.Databricks/workspaces) get their address space from an Azure Virtual Network Manager IPAM pool: the subnets are created with ipamPoolPrefixAllocations (256 addresses each) instead of a fixed addressPrefixes. The IPAM pool lives in another subscription in the same tenant.

What happens: after the workspace is created, both subnets keep their addressPrefixes, but ipamPoolPrefixAllocations is gone (null). A private endpoint subnet in the same VNet, created the same way but without Databricks, keeps its allocation. Writing the allocation back with a subnet PUT works, it then persists, and the workspace stays healthy.

When it happens: we polled the subnets every 10 seconds during a fresh workspace deployment and matched the poll with the Activity Log. The allocation survives:

  1. our subnet creation and NSG association (Microsoft.Network/virtualNetworks/subnets/write);
  2. three Microsoft.Network/virtualNetworks/subnets/UnprepareNetworkPolicies/action calls by the AzureDatabricks resource provider's service principal.

It disappears exactly when Microsoft.Network/virtualNetworks/subnets/PrepareNetworkPolicies/action runs on each subnet (called by a Microsoft first-party service principal, not ours) and the Databricks network intent policy (ADB-NORWAYEAST-DP-TO-CP-PL-…) appears on the subnet. The private subnet lost it first, the public subnet 12 seconds later, each at its own PrepareNetworkPolicies call.

Step Operation Called by Allocation afterwards
1 subnets/write (create, NSG) our deployment identity present
2 subnets/UnprepareNetworkPolicies/action (Γ—3) AzureDatabricks resource provider present
3 subnets/PrepareNetworkPolicies/action (one per subnet) Microsoft first-party principal missing

It is reproducible: it happened on two workspaces on two days (2026-12-01 and 2026-12-02), each with its own pair of new subnets in the same VNet. Subnets of an existing workspace were not touched when the second workspace was deployed.

Questions

  1. Is it expected that PrepareNetworkPolicies (the network intent policy for Databricks) rewrites the subnet without ipamPoolPrefixAllocations? It looks like a bug: a platform operation silently drops a property the customer set.
  2. While the allocation is missing, does the IPAM pool still count the subnet's prefix as allocated, or could it hand out an overlapping prefix to another subnet?
  3. Is it supported to write the allocation back on a subnet that has a network intent policy attached (our current workaround), and is there a recommended way to create Databricks subnets from an IPAM pool without this drift?

Impact: every new workspace leaves its subnets without an IPAM allocation until a second deployment restores it. Infrastructure-as-code plans show drift, and IPAM's view of address usage is incomplete in the meantime. We have correlation IDs and a 10-second poll log and can share them privately.

Azure Databricks
Azure Databricks

An Apache Spark-based analytics platform optimized for Azure.

0 comments No comments

1 answer

Sort by: Oldest
  1. Alex Burlachenko 26,470 Reputation points MVP Volunteer Moderator
    2026-12-02T14:34:17.9933333+00:00

    hi Lars & thx for join me at Q&A platform,

    Based on what u described, this looks like a platform-side issue rather than a Terraform problem. I don't see any documented reason why PrepareNetworkPolicies should remove ipamPoolPrefixAllocations. I'd check whether the affected prefixes are still registered in the IPAM pool after the operation. Just because addressPrefixes remains populated doesn't mean IPAM still reserves those addresses.

    As for ur workaround, it seems reasonable as a temporary solution, but I wouldn't rely on it until MS confirms that it's supported. I'd suggest opening a support case with Azure Networking and asking them to involve the AVNM IPAM and Databricks teams. U already have correlation IDs and logs, which should help MS investigate this without repeating the troubleshooting.

    Would be interesting to hear from the MS engineering team whether this is a known issue.

    Best regards,

    Alex

    πŸ’¬ P.S. Did this help? Mark it as the solution: it keeps me motivated!

    βž• Follow me on Q&A for more answers

    πŸ“ And feel free to visit my blog β†’ https://ctrlaltdel.blog/

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.