diff --git a/modules/azure/storage_account_public/main.tf b/modules/azure/storage_account_public/main.tf index 76812367..2c59dfb9 100644 --- a/modules/azure/storage_account_public/main.tf +++ b/modules/azure/storage_account_public/main.tf @@ -36,6 +36,7 @@ resource "azurerm_storage_account" "storage_account" { blob_properties { change_feed_enabled = var.change_feed_enabled + versioning_enabled = var.versioning_enabled dynamic "cors_rule" { for_each = var.cors_rules diff --git a/modules/azure/storage_account_public/variables.tf b/modules/azure/storage_account_public/variables.tf index f09e4760..7a31b90e 100644 --- a/modules/azure/storage_account_public/variables.tf +++ b/modules/azure/storage_account_public/variables.tf @@ -116,6 +116,12 @@ variable "delete_retention_policy_days" { default = null } +variable "versioning_enabled" { + type = bool + description = "Enable or disable blob versioning. Azure keeps versioning on for as long as an object replication policy uses this account as its source and rejects an update that turns it off, so such an account has to set this to true." + default = false +} + variable "change_feed_enabled" { type = bool description = "Enable or disable the blob service change feed. Azure keeps the change feed on for as long as an object replication policy uses this account as its source and rejects an update that turns it off, so such an account has to set this to true."