resourceGroups
Summary
Details
Ensure Resource Group and its Resources are located in the same Region
Impact: High Category: Disaster Recovery
APRL GUID: 98bd7098-49d6-491b-86f1-b143d6b1a0ff
Description:
Ensure resource locations align with their resource group to manage resources during regional outages. ARM stores resource data, which if in an unavailable region, could halt updates, rendering resources read-only.
Potential Benefits:
Improves outage management
Learn More:
ARG Query:
Click the Azure Resource Graph tab to view the query
// Azure Resource Graph Query
// Provides a list of Azure Resource Groups that have resources deployed in a region different than the Resource Group region
resourcecontainers
| where type =~ "Microsoft.Resources/subscriptions/resourceGroups"
| project resourceGroupId = tolower(id), resourceGroupLocation = location
| join kind = inner (
resources
| where location !~ "Global" and // Exclude global resources
resourceGroup !~ "NetworkWatcherRG" and // Exclude resources in the NetworkWatcherRG
id has "/resourceGroups/" // Exclude resources not in a resource group
| project id, name, tags, resourceGroup, location, resourceGroupId = tolower(strcat_array(array_slice(split(id, "/"), 0, 4), "/"))
)
on resourceGroupId
| where resourceGroupLocation !~ location
| project
recommendationId = "98bd7098-49d6-491b-86f1-b143d6b1a0ff",
name,
id,
tags,
param1 = strcat("resourceLocation: ", location),
param2 = strcat("resourceGroupLocation: ", resourceGroupLocation),
param3 = strcat("resourceGroup: ", resourceGroup)