我正在尝试创建备份策略并启用备份,同时使用 terraform(Terraform 版本 - 1.1.13,Azure Provider - 2.90.0)预配 Azure VM。Terraform 无法启用备份并出现以下错误。
Error: waiting for the Azure Backup Protected VM "VM;iaasvmcontainerv2;Test-product-cloud-infra;arulazurebkup-vm" to be true (Resource Group "Test-Product-Cloud-Infra") to provision: context deadline exceeded
│
│ with azurerm_backup_protected_vm.backup,
│ on main.tf line 176, in resource "azurerm_backup_protected_vm" "backup":
│ 176: resource "azurerm_backup_protected_vm" "backup" {
│
地形脚本
resource "azurerm_backup_policy_vm" "example" {
name = "Test-backup-policy"
resource_group_name = "Test-Product-Cloud-Infra"
recovery_vault_name = "backuptest"
backup {
frequency = "Daily"
time = "23:00"
}
retention_daily {
count = 7
}
}
resource "azurerm_backup_protected_vm" "backup" {
resource_group_name = "Test-Product-Cloud-Infra"
recovery_vault_name = "backuptest"
source_vm_id = azurerm_virtual_machine.example.id
backup_policy_id = azurerm_backup_policy_vm.example.id
depends_on = [azurerm_virtual_machine.example,
azurerm_virtual_machine_extension.example,
azurerm_backup_policy_vm.example]
}