Terraform v1.0.4
提供程序 registry.terraform.io/hashicorp/azurerm v2.73.0
升级到 v2.74.0 - 问题仍然存在。
尝试使用 terraform 创建备份保管库时:
resource "azurerm_data_protection_backup_vault" "backupvault" {
name = "good-name-for-backup-vault"
resource_group_name = azurerm_resource_group.transport.name
location = azurerm_resource_group.transport.location
datastore_type = "VaultStore"
redundancy = "LocallyRedundant"
identity {
type = "SystemAssigned"
}
}
我收到以下错误:
Debug Output
Panic Output
│ Error: waiting for creation of the DataProtection BackupVault ("Backup Vault: (Name \"good-name-for-backup-vault\" /
Resource Group \"transport-resources\")"): Future#WaitForCompletion: the number of retries has been exceeded:
StatusCode=404 -- Original Error: Code="InvalidResourceType" Message="The resource type could not be found in the
namespace 'Microsoft.DataProtection' for api version '2021-01-01'."
│
│ with azurerm_data_protection_backup_vault.backupvault,
│ on backup.tf line 1, in resource "azurerm_data_protection_backup_vault" "backupvault":
│ 1: resource "azurerm_data_protection_backup_vault" "backupvault" {
问题是创建了备份保险库(如果从门户查看 - 您可以看到它),但 terraform 显示错误并停止。这在 7 天前工作得很好。但至少在过去 3 天它开始显示此错误并停止。
此外,从门户删除备份保管库时,我收到类似的错误 - “在命名空间中找不到资源类型”。但试图第二次删除它 - 它删除资源就好了。 通过门户删除资源时出错。
更新:
所以错误消失了。不确定是什么问题 - 但相同的代码现在可以正常工作。