I cannot delete vnet

mkhan 0 Reputation points
2024-11-26T02:09:51.1066667+00:00

I cannot delete resource group

When I delete RG, ouccured below error messages

Why cannot delete RG?????

az group delete -g RG

Are you sure you want to perform this operation? (y/n): y

(ResourceGroupDeletionBlocked) Deletion of resource group 'RG' failed as resources with identifiers 'Microsoft.Network/virtualNetworks/ce-vnet' could not be deleted. The provisioning state of the resource group will be rolled back. The tracking Id is 'ID'. Please check audit logs for more details.

Code: ResourceGroupDeletionBlocked

Message: Deletion of resource group 'RG' failed as resources with identifiers 'Microsoft.Network/virtualNetworks/ce-vnet' could not be deleted. The provisioning state of the resource group will be rolled back. The tracking Id is 'id'. Please check audit logs for more details.

Exception Details: (None) {"error":{"code":"InUseSubnetCannotBeDeleted","message":"Subnet ce-psql-snet is in use by /subscriptions/~/resourceGroups/RG/providers/Microsoft.Network/virtualNetworks/ce-vnet/subnets/ce-psql-snet/serviceAssociationLinks/6fc5fea3-4a9c-a04e-2a8b-337235072c7e-service-association-link and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet.","details":[]}}

Code: None

Message: {"error":{"code":"InUseSubnetCannotBeDeleted","message":"Subnet ce-psql-snet is in use by /subscriptions/~~/resourceGroups/~/providers/Microsoft.Network/virtualNetworks/ce-vnet/subnets/ce-psql-snet/serviceAssociationLinks/6fc5fea3-4a9c-a04e-2a8b-337235072c7e-service-association-link and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet.","details":[]}}

Target: /subscriptions/~~/resourceGroups/~/providers/Microsoft.Network/virtualNetworks/ce-vnet

az resource delete --ids /subscriptions/~/resourceGroups/~/providers/Microsoft.Network/virtualNetworks/ce-vnet/subnets/ce-psql-snet/serviceAssociationLinks/6fc5fea3-4a9c-a04e-2a8b-337235072c7e-service-association-link

Some resources failed to be deleted (run with --verbose for more information):

/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/ce-vnet/subnets/ce-psql-snet/serviceAssociationLinks/6fc5fea3-4a9c-a04e-2a8b-337235072c7e-service-association-link

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
40,233 questions
{count} votes

Your answer

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