Open alexpilon666 opened 1 month ago
Hi, I am facing a similar issue with the partitioning_enabled
attribute on the azurerm_servicebus_queue
resource.
When changing enable_partitioning
to partitioning_enabled
in the code, it is ignored and enable_partitioning
revert to its default value which cause the plan to suggest the recreation of the queue.
Here is the code:
resource "azurerm_servicebus_queue" "main" {
name = "queue-name"
namespace_id = local.service_bus.id
dead_lettering_on_message_expiration = false
partitioning_enabled = true
}
And the plan output:
# azurerm_servicebus_queue.main must be replaced
-/+ resource "azurerm_servicebus_queue" "main" {
~ auto_delete_on_idle = "P10675199DT2H48M5.4775807S" -> (known after apply)
~ batched_operations_enabled = true -> (known after apply)
~ default_message_ttl = "P10675199DT2H48M5.4775807S" -> (known after apply)
~ duplicate_detection_history_time_window = "PT10M" -> (known after apply)
~ enable_partitioning = true -> false # forces replacement
~ express_enabled = false -> (known after apply)
~ id = "/subscriptions/..." -> (known after apply)
~ lock_duration = "PT1M" -> (known after apply)
~ max_message_size_in_kilobytes = 256 -> (known after apply)
~ max_size_in_megabytes = 5120 -> (known after apply)
name = "queue-name"
# (11 unchanged attributes hidden)
}
It works on azurerm_servicebus_topic
resource though.
Since the issue is on a different resource than the one referenced in this issue, let me know if I should open a new issue for azurerm_servicebus_queue
I am seeing a similar issue in azurerm 3.113.0 / TF 1.9.3 with azurerm_servicebus_queue.enable_partitioning
vs azurerm_servicebus_queue.partitioning_enabled
. enable_partitioning
is marked as deprecated and issues a warning, but if I change it to partitioning_enabled
it doesn't take, and I instead get an error that non-partitioned entities are not allowed in partitioned namespace
. If I pass both, I get Error: Conflicting configuration arguments
.
Upgrading to azurerm 4.0.x solved the issue
Is there an existing issue for this?
Community Note
Terraform Version
1.9.2
AzureRM Provider Version
3.112.0
Affected Resource(s)/Data Source(s)
azurerm_servicebus_topic
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Nothing should be changed since
enable_batched_operations
is now deprecated as of v3.112.0 and replaced withbatched_operations_enabled
.Actual Behaviour
The provider ignores the new
batched_operations_enabled
argument, and sinceenable_batched_operations
has been removed from the code it will nullify the value (which means setting it tofalse
in Azure).Steps to Reproduce
enable_batched_operations
withbatched_operations_enabled
inazurerm_servicebus_topic
resourceterraform plan
Important Factoids
No response
References
https://github.com/hashicorp/terraform-provider-azurerm/pull/26479#issuecomment-2227336619