简体   繁体   English

terraform azure 存储帐户禁用允许跨租户复制

[英]terraform azure Storage Account disable allow cross-tenant replication

I need to configure in terraform a storage account with the option Allow cross-tenant replicant disable.我需要在 terraform 中配置一个带有允许跨租户复制禁用选项的存储帐户。 How I can do it?我该怎么做? What is the parameter?参数是什么? thankss谢谢

AllowCrossTenantReplication is still in Preview so I don't think it will be in Terraform until it goes GA. AllowCrossTenantReplication仍处于预览阶段,所以我认为它不会出现在 Terraform 中,直到它进入 GA。 In the mean time, you can use Azure Policy to enforce this in your subscriptions.同时,您可以使用 Azure 策略在您的订阅中强制执行此操作。

Policy政策

( Link ) 链接

{
  "if": {
    "allOf": [
      {
        "field": "type",
        "equals": "Microsoft.Storage/storageAccounts"
      },
      {
        "not": {
          "field":"Microsoft.Storage/storageAccounts/allowCrossTenantReplication",
          "equals": "false"
        }
      }
    ]
  },
  "then": {
    "effect": "deny"
  }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM