hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.47k stars 4.55k forks source link

azurerm_cosmosdb_account does not support backup storage redundancy #12221

Open xsatishx opened 3 years ago

xsatishx commented 3 years ago

When you configure Cosmos DB there is an option to set "Backup storage redundancy" having three values

  1. Geo-redundant backup storage
  2. Zone-redundant backup storage
  3. Locally-redundant backup storage

The terraform resource for Cosmos DB under the backup block just supports the following

A backup block supports the following:

  1. type - (Required) The type of the backup. Possible values are Continuous and Periodic. Defaults to Periodic.
  2. interval_in_minutes - (Optional) The interval in minutes between two backups. This is configurable only when type is Periodic. Possible values are between 60 and 1440.
  3. retention_in_hours - (Optional) The time in hours that each backup is retained. This is configurable only when type is Periodic. Possible values are between 8 and 720.

There is no option to leverage Zone-redundancy and it defaults to Geo-redundancy by default.

This would result in data sovereignty issues. There needs to be a 4th option under the backup block to let us choose "zone_redundancy"

Community Note

Terraform (and AzureRM Provider) Version

Affected Resource(s)

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

backup {
  type                = "Periodic"
  interval_in_minutes = var.backup_interval
  retention_in_hours  = var.backup_retention
}

Debug Output

Panic Output

None

Expected Behaviour

If a redundancy option was available the option could have been set.

Actual Behaviour

backup storage redundancy is currently set to Geo-redundancy by default and cannot be modified by terraform

Steps to Reproduce

  1. terraform apply

Important Factoids

References

nvcoden commented 3 years ago

For some time I thought I might be doing something wrong, then I found this thread. Hopefully they add that feature soon

xsatishx commented 2 years ago

@katbyte any update on this?