last sync: 2021-Aug-04 14:59:26 UTC

Azure Policy definition

Audit resource location matches resource group location

Name Audit resource location matches resource group location
Azure Portal
Id 0a914e76-4921-4c19-b460-a2d36003525a
Version 2.0.0
details on versioning
Category General
Microsoft docs
Description Audit that the resource location matches its resource group location
Mode Indexed
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Fixed: audit
Used RBAC Role none
History
Date/Time (UTC ymd) (i) Change type Change detail
2021-02-10 14:43:58 change Major (1.0.0 > 2.0.0)
Used in Initiatives none
JSON Changes

JSON
{
  "properties": {
    "displayName": "Audit resource location matches resource group location",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "Audit that the resource location matches its resource group location",
    "metadata": {
      "version": "2.0.0",
      "category": "General"
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "location",
          "notEquals": "[resourcegroup().location]"
          },
          {
            "field": "location",
            "notEquals": "global"
          }
        ]
      },
      "then": {
        "effect": "audit"
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "0a914e76-4921-4c19-b460-a2d36003525a"
}