# Resource 'myresource' was disallowed by policy. Policy: 'Allowed locations'. Reason: 'The resource location 'eastus2' is not allowed.'

- **ID:** `policy/azure-resource-location-not-allowed`
- **Domain:** policy
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 88%

## Root Cause

Azure Policy 'Allowed locations' restricts resource deployment to specific regions, and the requested location is not in the allowed list.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Azure Policy | active | — | — |
| Azure Resource Manager | active | — | — |
| Azure CLI 2.50+ | active | — | — |
| Terraform azurerm 3.0+ | active | — | — |

## Workarounds

1. **Deploy the resource to an allowed location. Use Azure CLI to list allowed locations: az policy assignment list --query "[?displayName=='Allowed locations'].properties.parameters.listOfAllowedLocations.value" -o tsv. Then redeploy to one of those regions.** (90% success)
   ```
   Deploy the resource to an allowed location. Use Azure CLI to list allowed locations: az policy assignment list --query "[?displayName=='Allowed locations'].properties.parameters.listOfAllowedLocations.value" -o tsv. Then redeploy to one of those regions.
   ```
2. **Request an exception to the policy from the Azure Policy administrator via a change request or by updating the policy assignment to include the desired location.** (70% success)
   ```
   Request an exception to the policy from the Azure Policy administrator via a change request or by updating the policy assignment to include the desired location.
   ```

## Dead Ends

- **** — Azure Policy evaluates at deployment time; any location not in the allowed list will be rejected. The policy is enforced at the subscription or management group level. (95% fail)
- **** — This requires high-level permissions (Owner or Policy Contributor) and may violate organizational compliance. It's not a viable workaround for most developers. (60% fail)
