From 9875cbb6505ec3957f64e31e5bc787d26edd7e35 Mon Sep 17 00:00:00 2001 From: Kelly Faessen Date: Wed, 12 Aug 2026 09:09:46 +0200 Subject: [PATCH] feat: make the blob change feed configurable on storage_account_public (AB#9281) Azure keeps the change feed on for as long as an object replication policy uses the account as its source, and rejects any update that turns it off. The module never set change_feed_enabled, so the provider sent its false default and every apply on such an account failed with InvalidRequestPropertyValue: The value 'False' is not allowed for property Change Feed because Object Replication is enabled. Accounts under an object replication policy can now declare change_feed_enabled = true. The default keeps the current behaviour. --- modules/azure/storage_account_public/main.tf | 2 ++ modules/azure/storage_account_public/variables.tf | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/modules/azure/storage_account_public/main.tf b/modules/azure/storage_account_public/main.tf index 1dcbf395..76812367 100644 --- a/modules/azure/storage_account_public/main.tf +++ b/modules/azure/storage_account_public/main.tf @@ -35,6 +35,8 @@ resource "azurerm_storage_account" "storage_account" { shared_access_key_enabled = var.shared_access_key_enabled blob_properties { + change_feed_enabled = var.change_feed_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 f70dcb23..f09e4760 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 "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." + default = false +} + variable "loganalytics_diagnostic_setting" { type = object({ workspace_id = string, // log analytics workspace ID