Azure Proactive Resiliency Library v2
Tools Glossary GitHub GitHub Issues Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

resourceGroups

Summary

RecommendationImpactCategoryAutomation AvailablePG Verified
Ensure Resource Group and its Resources are located in the same RegionHighDisaster RecoveryYesVerified

Details


Ensure Resource Group and its Resources are located in the same Region

Impact:  High Category:  Disaster Recovery PG Verified:  Verified

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:
Azure Resource Manager Overview

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
resources
| project id, name, tags, resourceGroup, location
| where location != "global"                                                                                                          // exclude global resources
| where resourceGroup != "networkwatcherrg"                                                                                           // exclude networkwatcherrg
| where split(id, "/", 3)[0] =~ "resourceGroups"                                                                                      // resource is in a resource group
| extend resourceGroupId = strcat_array(array_slice(split(id, "/"),0,4), "/")                                                         // create resource group resource id
| join (resourcecontainers | project containerid=id, containerlocation=location ) on $left.resourceGroupId == $right.['containerid']  // join to resourcecontainers table
| where  location != containerlocation
| project recommendationId="98bd7098-49d6-491b-86f1-b143d6b1a0ff", name, id, tags
| order by id asc