Azure App Service Plan部署报错:该区域订阅配额为0实例
Azure美国东部部署ASE及App Service Plan配额错误问题
我正尝试在Azure美国东部区域部署Function App(EP1)、App Service Environment(I1v2)及对应的App Service Plans,使用Azure门户、CLI和Terraform三种工具,但执行terraform apply后持续收到如下错误,且CLI和门户中的报错内容完全一致:
│ Error: creating App Service Plan (Subscription: "<redacted>" │ Resource Group Name: "rg_nam_ss_eus_<redacted>" │ Server Farm Name: "asp-<redacted>-I1v2"): performing CreateOrUpdate: unexpected status 401 (401 Unauthorized) with response: {"Code":"Unauthorized","Message":"This region has quota of 0 instances for your subscription. Try selecting different region or SKU.","Target":null,"Details":[{"Message":"This region has quota of 0 instances for your subscription. Try selecting different region or SKU."},{"Code":"Unauthorized"},{"ErrorEntity":{"ExtendedCode":"52039","MessageTemplate":"{0}. Try selecting different region or SKU.","Parameters":["This region has quota of 0 instances for your subscription"],"Code":"Unauthorized","Message":"This region has quota of 0 instances for your subscription. Try selecting different region or SKU."}}],"Innererror":null} │ │ with azurerm_service_plan.res-77, │ on main.aztfexport.tf line 374, in resource "azurerm_service_plan" "res-77": │ 374: resource "azurerm_service_plan" "res-77" { │ │ creating App Service Plan (Subscription: "<redacted>" │ Resource Group Name: "rg_nam_ss_eus_<redacted>" │ Server Farm Name: "asp-<redacted>-I1v2"): performing CreateOrUpdate: unexpected status 401 (401 Unauthorized) with response: │ {"Code":"Unauthorized","Message":"This region has quota of 0 instances for your subscription. Try selecting different region or │ SKU.","Target":null,"Details":[{"Message":"This region has quota of 0 instances for your subscription. Try selecting different region or │ SKU."},{"Code":"Unauthorized"},{"ErrorEntity":{"ExtendedCode":"52039","MessageTemplate":"{0}. Try selecting different region or │ SKU.","Parameters":["This region has quota of 0 instances for your subscription"],"Code":"Unauthorized","Message":"This region has quota of 0 │ instances for your subscription. Try selecting different region or SKU."}}],"Innererror":null} ╵ ╷ │ Error: creating App Service Plan (Subscription: "<redacted>" │ Resource Group Name: "rg_nam_ss_eus_<redacted>" │ Server Farm Name: "asp-<redacted>-fa-EP1"): performing CreateOrUpdate: unexpected status 401 (401 Unauthorized) with response: {"Code":"Unauthorized","Message":"This region has quota of 0 instances for your subscription. Try selecting different region or SKU.","Target":null,"Details":[{"Message":"This region has quota of 0 instances for your subscription. Try selecting different region or SKU."},{"Code":"Unauthorized"},{"ErrorEntity":{"ExtendedCode":"52039","MessageTemplate":"{0}. Try selecting different region or SKU.","Parameters":["This region has quota of 0 instances for your subscription"],"Code":"Unauthorized","Message":"This region has quota of 0 instances for your subscription. Try selecting different region or SKU."}}],"Innererror":null} │ │ with azurerm_service_plan.res-78, │ on main.aztfexport.tf line 389, in resource "azurerm_service_plan" "res-78": │ 389: resource "azurerm_service_plan" "res-78" { │ │ creating App Service Plan (Subscription: "<redacted>" │ Resource Group Name: "rg_nam_ss_eus_<redacted>" │ Server Farm Name: "asp-<redacted>-fa-EP1"): performing CreateOrUpdate: unexpected status 401 (401 Unauthorized) with response: │ {"Code":"Unauthorized","Message":"This region has quota of 0 instances for your subscription. Try selecting different region or │ SKU.","Target":null,"Details":[{"Message":"This region has quota of 0 instances for your subscription. Try selecting different region or │ SKU."},{"Code":"Unauthorized"},{"ErrorEntity":{"ExtendedCode":"52039","MessageTemplate":"{0}. Try selecting different region or │ SKU.","Parameters":["This region has quota of 0 instances for your subscription"],"Code":"Unauthorized","Message":"This region has quota of 0 │ instances for your subscription. Try selecting different region or SKU."}}],"Innererror":null}
ASE的Terraform定义
resource "azurerm_app_service_environment_v3" "res-75" { internal_load_balancing_mode = "Web, Publishing" name = local.ase_name remote_debugging_enabled = true resource_group_name = azurerm_resource_group.rg.name subnet_id = "/subscriptions/${local.spoke_subscription_id}/resourceGroups/${local.spoke_rg_name}/providers/Microsoft.Network/virtualNetworks/${local.spoke_vnet_name}/subnets/${local.spoke_subnet_name_ase}" allow_new_private_endpoint_connections = true zone_redundant = false cluster_setting { name = "DisableTls1.0" value = "1" } tags = { Project = tostring(local.project_name) } }
已排查内容
- 已为订阅注册几乎所有资源提供商
- 所有资源均部署在美国东部区域
- 已申请几乎所有计算堆栈的配额提升,但配额使用率为0%,部分项显示“0/0可用”或需排查
- 连续两周每日尝试部署,排除临时故障可能
- 该问题仅出现在此新订阅,其他订阅无异常
- 已排查网络问题,未发现异常
若有人知晓部署I1v2或EP1类型App Service Plan所需的具体配额信息,恳请告知。目前无法在公开资料中找到相关内容。
内容的提问来源于stack exchange,提问作者Sydney
相关产品推荐
相关产品推荐

