user10480902
user10480902

Reputation: 11

Unable to delete Azure SQL Managed Instances resources

I created a resource group for creating all Azure SQL Managed Instance resources but I cannot drop the resource group. It now has a route table, virtual cluster and a vnet and none of the resources can be deleted.

Upvotes: 1

Views: 3579

Answers (2)

Danimir Ljepava
Danimir Ljepava

Reputation: 31

This issue is resolved through manually deleting the virtual cluster that was containing the deleted managed instance. The official documentation on deleting the virtual cluster to release networking resources is now available here

Background of the issue: The virtual cluster is kept alive for the next 12 hours by design to ensure that next instance created in the same subnet will only take a few minutes (instead of hours). There is no cost (no billing) for keeping the virtual cluster. Consequently the virtual cluster holds the networking resource and these cannot be deleted until the time to keep the virtual cluster alive has expired. Virtual cluster can now be manually removed through the portal or API, as documented in the article provided. This will allow immediate release and deletion of the networking resources.

Upvotes: 0

Jovan MSFT
Jovan MSFT

Reputation: 14580

You cannot delete the resource group while there is still a Virtual Cluster in the subnet.

The Virtual Cluster in your subnet/resource group don't allow the subnet/resource group to be deleted. Once you create an Azure SQL DB Managed Instance, a Virtual Cluster that contains the Managed Instances is automatically created. Once you delete the last Instance, the Virtual Cluster is retained for some time.

The Virtual cluster is retained for some time because if you want to create a new Managed Instance in the subnet that contains Virtual cluster it will take 5-10 minutes, while creation of Managed Instance in the subnet without Virtual cluster can take hours. Just wait for a some time and Virtual cluster will be deleted. Then you will able to delete the subnet and resource group.

In the future we will either quickly delete empty virtual clusters or let you explicitly delete it.

Upvotes: 2

Related Questions