Open zanoni23 opened 2 years ago
@zanoni23 thanks for opening this issue. It seems that this is an Azure API issue. I have filed an API issue for it. Could you follow it for more update?
Not to hijack this issue but can someone tell me what the difference between them is? I've made resources with all of them and can't seem to figure out the difference.
Having the same problem:
Terraform Version 1.2.8
AzureRM Provider Version 3.35.0
Affected Resource
azurerm_data_protection_backup_vault
Configured ressource:
resource azurerm_data_protection_backup_vault "backup_vault" {
name = "${var.environment.alias}-bv-vaultstore-${local.hub_location_alias}" resource_group_name = azurerm_resource_group.rg["rg_backup"].name location = azurerm_resource_group.rg["rg_backup"].location datastore_type = "SnapshotStore" redundancy = "LocallyRedundant" }
It fails with Message="Input provided for the call is invalid"
I tried to set all different values for redundancy to no avail as the terraform validate command only allows GeoRedundant and LocallyRedudant.
It appears the bug in the Azure API is fixed as the related issue is closed and the merge is completed. @sinbai : When can we expect the concordant pull request on Terraform and its release to happen?
The datastore_type should allow for OperationalStore now rather than SnapshotStore. Can we get this fixed?
Is there an existing issue for this?
Community Note
Terraform Version
1.3.2 linux_amd64
AzureRM Provider Version
3.27.0
Affected Resource(s)/Data Source(s)
azurerm_data_protection_backup_vault
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
azurerm_data_protection_backup_vault.disk-backup-vault: Creating... azurerm_data_protection_backup_vault.disk-backup-vault: Still creating... [10s elapsed] azurerm_data_protection_backup_vault.disk-backup-vault: Creation complete after 12s
Actual Behaviour
azurerm_data_protection_backup_vault.disk-backup-vault: Creating... ╷ │ Error: creating DataProtection BackupVault ("Backup Vault (Subscription: \"XXXXXXX-a36e-4e90-b621-d6348168280b\"\nResource Group Name: \"sft-backup-ts-aue-01-rg\"\nVault Name: \"sft-disk-backups-md-aue-01-bv\")"): performing CreateOrUpdate: backupvaults.BackupVaultsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="BMSUserErrorInvalidInput" Message="Input provided for the call is invalid" AdditionalInfo=[{"info":{"code":"BMSUserErrorInvalidInput","details":null,"innerError":null,"isRetryable":false,"isUserError":false,"message":"Input provided for the call is invalid","properties":{"ActivityId":"9a6d916e-688c-47c0-a92e-e5a7bd731360"},"recommendedAction":["Please check the required inputs"],"target":""},"type":"UserFacingError"}] │ │ with azurerm_data_protection_backup_vault.disk-backup-vault, │ on main.tf line 1, in resource "azurerm_data_protection_backup_vault" "disk-backup-vault": │ 1: resource "azurerm_data_protection_backup_vault" "disk-backup-vault" {
This worked earlier in the year within the same subscription/region. I'm trying to deploy a test instance and it fails.
Perhaps related, I tried to import a Vault into TF state, using the resource id copied from the Azure Portal and got an error:
In the resource path I changed the BackupVaults to backupVaults and it then imported okay.
Steps to Reproduce
terraform apply
Important Factoids
No response
References
Terraform docs: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/data_protection_backup_vault MS API docs: https://learn.microsoft.com/en-us/rest/api/dataprotection/backup-vaults/create-or-update?tabs=HTTP#storagesettingstoretypes