policy
config_error
ai_generated
true
资源 'myresource' 被策略禁止。策略:'允许的位置'。原因:资源位置 'eastus2' 不被允许。允许的位置:'westus', 'westus2'。
Resource 'myresource' was disallowed by policy. Policy: 'Allowed locations'. Reason: 'The resource location 'eastus2' is not allowed. Allowed locations: 'westus', 'westus2'.
ID: policy/azure-resource-location-restriction
95%修复率
90%置信度
1证据数
2024-02-05首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| Azure Policy 2024-01-01 | active | — | — | — |
| ARM API 2023-09-01 | active | — | — | — |
根因分析
Azure 策略将资源部署限制在特定区域,但部署模板指定的位置不在允许列表中。
English
An Azure policy restricts resource deployment to specific regions, but the deployment template specifies a location outside the allowed list.
官方文档
https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effects解决方案
-
更新 ARM 模板或 Bicep 文件以使用允许的位置。示例:location: 'westus' 而不是 'eastus2'。然后重新部署。
-
通过提交支持工单或使用 Azure Policy 的豁免功能,向 Azure 策略管理员请求例外。
无效尝试
常见但无效的做法:
-
70% 失败
Dependent resources might be in a different region, leading to latency or cross-region charges.
-
90% 失败
Policy is enforced by Azure administrators; disabling it requires elevated permissions and may be audited.
-
95% 失败
Azure policies are scoped to resource types and locations; changing the name does not affect the policy evaluation.