Resource Groups


The presented resiliency recommendations in this guidance include Resource Groups and its associated settings.

Summary of Recommendations

Recommendations Details

RG-1 - リソース グループとそのリソース群が同じリージョンにあることを確認します

Category: Disaster Recovery

Impact: High

Guidance

リソースの場所が、含まれているリソース グループの場所と一致していることを確認します。これにより、リージョンで障害が発生した場合でも、リソースを管理できます。ARM は、リソース グループ内のリソースのリソース データを格納し、リージョンが使用できない場合、このデータの更新が失敗し、リソースが実質的に読み取り専用になる可能性があります。

Resources

Resource Graph 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="rg-1", name, id, tags
| order by id asc