gpt4 book ai didi

azure - 读取 azurerm_backup_protected_file_share 时出错 - BMSUserErrorCrossRegionRestoreNotEnabledInThisVault

转载 作者:行者123 更新时间:2023-12-03 06:16:31 29 4
gpt4 key购买 nike

我正在尝试使用 Terraform 脚本中的 azurerm_backup_protected_file_share 资源读取 Azure 中受备份保护的文件共享。但是,当我尝试执行该脚本时,收到以下错误消息:

Error: BMSUserErrorCrossRegionRestoreNotEnabledInThisVault: Cross region restore is not enabled for the backup vault <vault_name>.

我已仔细检查备份保管库是否存在,并且文件共享是否受保管库中的备份策略保护。我还确认我用于通过 Azure 进行身份验证的凭据具有访问备份保管库所需的权限。

什么可能导致此错误,如何解决?

最佳答案

尝试更改提供商的版本。

我有以下 azurerm 提供程序版本并且它有效。

Providers.tf

azurerm = {
source = "hashicorp/azurerm"
//version = "=3.0.2"
version = "=3.50.0"

}

代码:

resource "azurerm_backup_container_storage_account" "protection-container" {
resource_group_name = xxxx
recovery_vault_name = xxxx
storage_account_id = xxx
}

resource "azurerm_backup_policy_file_share" "example" {
name = "tfexxxxpolicy"
resource_group_name = data.azurerm_resource_group.example.name
recovery_vault_name = azurerm_recovery_services_vault.vault.name


backup {
frequency = "Daily"
time = "23:00"
}

retention_daily {
count = 10
}
}

resource "azurerm_backup_protected_file_share" "share1" {

resource_group_name = data.azurerm_resource_group.example.name
recovery_vault_name = azurerm_recovery_services_vault.vault.name
source_storage_account_id = azurerm_backup_container_storage_account.protection-container.storage_account_id
source_file_share_name = azurerm_storage_share.example.name
backup_policy_id = azurerm_backup_policy_file_share.example.id

}

enter image description here

关于azure - 读取 azurerm_backup_protected_file_share 时出错 - BMSUserErrorCrossRegionRestoreNotEnabledInThisVault,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76211945/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com