You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法删除Azure存储账户:创建状态停滞2天,删资源组也报错求助

问题描述

尝试通过Azure CLI删除存储账户时失败,执行命令:

az storage account delete --ids /subscriptions/00000000-0000-0000-0000-0000000000/resourceGroups/foo-rg/providers/Microsoft.Storage/storageAccounts/foostorageaccount --yes

收到错误提示:

(StorageAccountInCreating) Cannot delete the storage account while it is being created. Please retry after the storage account is fully created. Code: StorageAccountInCreating Message: Cannot delete the storage account while it is being created. Please retry after the storage account is fully created.

该异常状态已持续2天,尝试删除整个资源组也返回相同错误。

解决方法
  • 使用ARM模板强制清理
    利用ARM部署的Complete模式,删除资源组内未在模板中定义的所有资源,包括卡住的存储账户:

    1. 创建模板文件force-delete.json:
    {
        "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
        "contentVersion": "1.0.0.0",
        "resources": []
    }
    
    1. 执行部署命令(确认资源组仅用于测试后操作):
    az deployment group create --resource-group foo-rg --template-file force-delete.json --mode Complete
    
  • 通过PowerShell尝试删除
    执行PowerShell命令,尝试绕过CLI的状态校验:

    Remove-AzStorageAccount -ResourceGroupName foo-rg -Name foostorageaccount -Force
    
  • 提交Azure支持工单
    若上述方法无效,直接在Azure门户提交支持工单,选择"资源管理"->"资源删除失败"类别,提供存储账户ID、错误信息及问题持续时间,后台支持团队可清理异常状态的资源。

内容的提问来源于stack exchange,提问作者Metro

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.15 22:22:13