Cannot remove resource group

Valiantsina Rezaei 0 Reputation points
2024-02-01T14:30:32.6466667+00:00

During the attempt to delete a resource group, I have accounted the following error: Failed to delete resource group azure-storage-account-resource-group: Deletion of resource group 'azure-storage-account-resource-group' failed as resources with identifiers 'Microsoft.RecoveryServices/vaults/vault-lrywtw7h' could not be deleted. The provisioning state of the resource group will be rolled back. The tracking Id is '82d0d23b-2a8f-4f46-b353-693159f6b212'. Please check audit logs for more details. (Code: ResourceGroupDeletionBlocked) The request to delete the resource 'Microsoft.RecoveryServices/vaults/vault-lrywtw7h' failed. subscription id 'f3734af6-c26d-4c85-aeb7-e6520ca52f56', activity id '0a0ed1b6-8542-4b4b-88c6-b4436b345b29', request correlation id '82d0d23b-2a8f-4f46-b353-693159f6b212'. (Code: ResourceDeletionFailed, Target: /subscriptions/f3734af6-c26d-4c85-aeb7-e6520ca52f56/resourceGroups/azure-storage-account-resource-group/providers/Microsoft.RecoveryServices/vaults/vault-lrywtw7h)

Azure Site Recovery
Azure Site Recovery
An Azure native disaster recovery service. Previously known as Microsoft Azure Hyper-V Recovery Manager.
636 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Marco Zemp 235 Reputation points
    2024-02-01T16:47:44.9166667+00:00

    From the Microsoft Learn page:
    You can't delete a Recovery Services vault with any of the following dependencies:

    • You can't delete a vault that contains protected data sources (for example, IaaS VMs, SQL databases, Azure file shares).
    • You can't delete a vault that contains backup data. Once backup data is deleted, it will go into the soft deleted state.
    • You can't delete a vault that contains backup data in the soft deleted state.
    • You can't delete a vault that has registered storage accounts.

    Please only delete the backups if you are 100% sure you don't need them anymore.

    Here is a guide on how to do it:
    https://learn.microsoft.com/en-us/azure/backup/backup-azure-delete-vault?tabs=portal

    1 person found this answer helpful.