NAT Gateway is a fully managed service that securely routes internet traffic from a private virtual network with enterprise-grade performance and low latency.
Hi @ Pawel Lewandowski •,
Welcome to Microsoft Q&A Platform
This behavior is expected and by design when working with Azure Databricks–managed resources.
When an Azure Databricks workspace is created, Azure automatically provisions a Databricks-managed resource group (MRG). This managed resource group and its associated resources (VNets, subnets, NSGs, disks, NAT Gateway, etc.) are protected by system-generated deny assignments.
That is why the operation fails with:
Microsoft.Network/networkSecurityGroups/join/action
- Even though you have sufficient RBAC permissions, the deny assignment blocks changes such as disassociating a NAT Gateway from a subnet.
- The deny assignment is not created by an Azure Deployment Stack
- It cannot be removed or modified manually
- Assigning higher roles (Contributor/Owner) will not resolve the issue
- Direct deletion of the Databricks-managed resource group is not supported
To resolve the issue :
- Delete the Azure Databricks workspace that created the managed resource group
- This is the only supported way to remove the deny assignment and the managed RG.
- If you require full control over networking resources: Recreate the Databricks workspace using a custom VNet configuration.
Refer the links which are related to same issue:
Fixing issue of Deny assignment with azure databricks
Deny assignment modification to allow attach/detach of disks in azure databricks
Deny Assignments in Azure
I hope this information helps resolve your issue. Please feel free to ask if the provided solution does not help or if you have any additional questions.
Please Accept the answer if the information helped you. This will help us and others in the community as well.