policy
config_error
ai_generated
true
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%Fix Rate
90%Confidence
1Evidence
2024-02-05First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| Azure Policy 2024-01-01 | active | — | — | — |
| ARM API 2023-09-01 | active | — | — | — |
Root Cause
An Azure policy restricts resource deployment to specific regions, but the deployment template specifies a location outside the allowed list.
generic中文
Azure 策略将资源部署限制在特定区域,但部署模板指定的位置不在允许列表中。
Official Documentation
https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effectsWorkarounds
-
95% success Update the ARM template or Bicep file to use an allowed location. Example: location: 'westus' instead of 'eastus2'. Then redeploy.
Update the ARM template or Bicep file to use an allowed location. Example: location: 'westus' instead of 'eastus2'. Then redeploy.
-
60% success Request an exception from the Azure policy administrator by opening a support ticket or using Azure Policy's exemption feature.
Request an exception from the Azure policy administrator by opening a support ticket or using Azure Policy's exemption feature.
中文步骤
更新 ARM 模板或 Bicep 文件以使用允许的位置。示例:location: 'westus' 而不是 'eastus2'。然后重新部署。
通过提交支持工单或使用 Azure Policy 的豁免功能,向 Azure 策略管理员请求例外。
Dead Ends
Common approaches that don't work:
-
70% fail
Dependent resources might be in a different region, leading to latency or cross-region charges.
-
90% fail
Policy is enforced by Azure administrators; disabling it requires elevated permissions and may be audited.
-
95% fail
Azure policies are scoped to resource types and locations; changing the name does not affect the policy evaluation.