Azure Storageでテナント間のオブジェクトレプリケーションが許可されている

承認された用途に限り、テナント間のオブジェクトレプリケーションを許可してください。

説明

別の Microsoft Entra テナントに Blob を複製するには、コピー元とコピー先の両方のストレージアカウントでテナント間の複製を許可し、オブジェクトレプリケーションのポリシーを設定します。匿名読み取りは別の設定です。

想定される影響

未承認の宛先をポリシーに含めると、組織の管理範囲外にデータのコピーが作成されます。

対処方法

テナント間の複製が不要なら、該当する既存ポリシーを削除してから cross_tenant_replication_enabled = false を設定します。適用後にアカウントの設定と、残したポリシーの宛先や対象データが承認内容と一致していることを確認してください。

例

2 つの Blob 対応アカウントは名前、リソースグループ、リージョン、レプリケーション方式も異なります。既存アカウントのテナント制限だけを変える場合は、これらの設定を維持します。

変更前

hcl
resource "azurerm_storage_account" "example" {
  name                     = "examplestorage"
  resource_group_name      = azurerm_resource_group.example.name
  location                 = azurerm_resource_group.example.location
  account_tier             = "Standard"
  account_replication_type = "GRS"

  cross_tenant_replication_enabled = true
}

変更後

hcl
resource "azurerm_storage_account" "example" {
  name                     = "safestorage"
  resource_group_name      = "testRG"
  location                 = "northeurope"
  account_tier             = "Standard"
  account_replication_type = "LRS"
  account_kind             = "StorageV2"

  cross_tenant_replication_enabled = false
}

参考資料