# 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`
- **Domain:** policy
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

An Azure policy restricts resource deployment to specific regions, but the deployment template specifies a location outside the allowed list.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Azure Policy 2024-01-01 | active | — | — |
| ARM API 2023-09-01 | active | — | — |

## Workarounds

1. **Update the ARM template or Bicep file to use an allowed location. Example: location: 'westus' instead of 'eastus2'. Then redeploy.** (95% success)
   ```
   Update the ARM template or Bicep file to use an allowed location. Example: location: 'westus' instead of 'eastus2'. Then redeploy.
   ```
2. **Request an exception from the Azure policy administrator by opening a support ticket or using Azure Policy's exemption feature.** (60% success)
   ```
   Request an exception from the Azure policy administrator by opening a support ticket or using Azure Policy's exemption feature.
   ```

## Dead Ends

- **** — Dependent resources might be in a different region, leading to latency or cross-region charges. (70% fail)
- **** — Policy is enforced by Azure administrators; disabling it requires elevated permissions and may be audited. (90% fail)
- **** — Azure policies are scoped to resource types and locations; changing the name does not affect the policy evaluation. (95% fail)
