Is there an existing issue for this?
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.
When selecting datastore_type = ArchiveStore
the azure API is rejecting it as requires the data store type to have vault store as well as archive store
Terraform Version
1.14.6
AzureRM Provider Version
4.64.0
Affected Resource(s)/Data Source(s)
azurerm_data_protection_backup_vault
Terraform Configuration Files
resource "azurerm_data_protection_backup_vault" "geo-archive" {
name = "bv-geo-ArchiveStore"
resource_group_name = "BUP"
location = "australiaeast"
datastore_type = "ArchiveStore"
redundancy = "GeoRedundant"
tags = {
environment = "dev"
}
}
To successfully deploy via azapi had to add a concat to the storagesettigns
NEW
storageSettings = concat(
[{
datastoreType = var.datastore_type
type = var.redundancy
}],
var.datastore_type == "ArchiveStore" ? [{
datastoreType = "VaultStore"
type = var.redundancy
}] : []
)
OLD
body = {
properties = {
storageSettings = [{
datastoreType = var.datastore_type
type = var.redundancy
}]
Debug Output/Panic Output
When using azurerm the following error is received
Error: creating DataProtection BackupVault ("Backup Vault (Subscription: \"d89d232b-f2c8-415e-b1a1-d8b8e4301ece\"\nResource Group Name: \"BUP\"\nBackup Vault Name: \"bv-geo-ArchiveStore\")"): performing BackupVaultsCreateOrUpdate: unexpected status 406 (406 Not Acceptable) received with no body
│
│ with module.backup_vault_zone_OperationalStore.azurerm_data_protection_backup_vault.geo-archive,
│ on modules\azurerm_dp_backup_vault\test-rm.tf line 3, in resource "azurerm_data_protection_backup_vault" "geo-archive":
│ 3: resource "azurerm_data_protection_backup_vault" "geo-archive" {
When attempting to use azapi to create the same resource configuration the following error is received, using old code
--------------------------------------------------------------------------------
│ RESPONSE 400: 400 Bad Request
│ ERROR CODE: BMSUserErrorOnlyArchiveStoreSentForStorageSettings
│ --------------------------------------------------------------------------------
│ {
│ "error": {
│ "additionalInfo": [
│ {
│ "type": "UserFacingError",
│ "info": {
│ "message": "Only ArchiveStore in StorageSettings is not allowed.",
│ "recommendedAction": [
│ "Please retry the operation after adding VaultStore in StorageSettings."
│ ],
│ "details": null,
│ "code": "BMSUserErrorOnlyArchiveStoreSentForStorageSettings",
│ "target": "",
│ "innerError": null,
│ "isRetryable": false,
│ "isUserError": false,
│ "properties": {
│ "ActivityId": "edfff86b-aa64-453b-91ca-c52cf7b5515c"
│ }
│ }
│ }
│ ],
│ "code": "BMSUserErrorOnlyArchiveStoreSentForStorageSettings",
│ "message": "Only ArchiveStore in StorageSettings is not allowed.",
│ "target": null,
│ "details": null
│ }
│ }
│ --------------------------------------------------------------------------------
Expected Behaviour
expected behaviour is to have backup vault created using azurerm resource this one was created using API with additional code fix
Actual Behaviour
Backup vault configured as ArchiveStore unable to be created unless using azapi
Steps to Reproduce
No response
Important Factoids
australia east region is in preview for secure by default for backup vault this is scheduled to be going global GA end of march 2026
References
No response
Is there an existing issue for this?
Community Note
When selecting datastore_type = ArchiveStore
the azure API is rejecting it as requires the data store type to have vault store as well as archive store
Terraform Version
1.14.6
AzureRM Provider Version
4.64.0
Affected Resource(s)/Data Source(s)
azurerm_data_protection_backup_vault
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
expected behaviour is to have backup vault created using azurerm resource this one was created using API with additional code fix
Actual Behaviour
Backup vault configured as ArchiveStore unable to be created unless using azapi
Steps to Reproduce
No response
Important Factoids
australia east region is in preview for secure by default for backup vault this is scheduled to be going global GA end of march 2026
References
No response