Open chintavasisht opened 1 year ago
1.3.9
3.73.0
data - azurerm_servicebus_topic
data "azurerm_servicebus_topic" "sb_topic" { name = "topic1" resource_group_name = var.rg_name namespace_name = var.namespace_name } resource "azurerm_servicebus_subscription" "sb" { for_each = { for sub in var.servicebus_subscription_names: sub => sub } name = each.key topic_id = data.azurerm_servicebus_topic.sb_topic.id max_delivery_count = var.max_count lock_duration = var.lock_duration }
# module.servicebus_subscription.azurerm_servicebus_subscription.subscription["sub3"] must be replaced -/+ resource "azurerm_servicebus_subscription" "subscription" { ~ auto_delete_on_idle = "P10675199DT2H48M5.4775807S" -> (known after apply) - dead_lettering_on_message_expiration = false -> null ~ default_message_ttl = "P10675199DT2H48M5.4775807S" -> (known after apply) - enable_batched_operations = false -> null ~ id = "/subscriptions/sub/resourceGroups/rg/providers/Microsoft.ServiceBus/namespaces/namespace/topics/topic1/subscriptions/sub3" -> (known after apply) name = "sub3" - requires_session = false -> null ~ topic_id = "/subscriptions/sub/resourceGroups/rg/providers/Microsoft.ServiceBus/namespaces/namespace/topics/topic1" -> (known after apply) # forces replacement # (5 unchanged attributes hidden) } # module.servicebus_subscription.azurerm_servicebus_subscription.subscription["sub4"] must be replaced -/+ resource "azurerm_servicebus_subscription" "subscription" { ~ auto_delete_on_idle = "P10675199DT2H48M5.4775807S" -> (known after apply) - dead_lettering_on_message_expiration = false -> null ~ default_message_ttl = "P10675199DT2H48M5.4775807S" -> (known after apply) - enable_batched_operations = false -> null ~ id = "/subscriptions/sub/resourceGroups/rg/providers/Microsoft.ServiceBus/namespaces/namespace/topics/topic1/subscriptions/sub4" -> (known after apply) name = "sub4" - requires_session = false -> null ~ topic_id = "/subscriptions/3c51cc28-d5df-44bb-b15c-cfdd64fff599/resourceGroups/RGTERRATEST-175246/providers/Microsoft.ServiceBus/namespaces/sb-175246-service-bus/topics/topic1" -> (known after apply) # forces replacement # (5 unchanged attributes hidden) } Plan: 2 to add, 1 to change, 2 to destroy.
Terraform should not destroy and recreate the subscription.
Terraform is attempting to recreate the service bus subscription(s) no matter how many times apply is run
Premium_SKU
No response
There was a similar bug/issue created, but was closed - #5131
Any update on this issue? We are also facing the same issue.
We are also facing same issue https://github.com/hmcts/sscs-shared-infrastructure/pull/186
Is there an existing issue for this?
Community Note
Terraform Version
1.3.9
AzureRM Provider Version
3.73.0
Affected Resource(s)/Data Source(s)
data - azurerm_servicebus_topic
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Terraform should not destroy and recreate the subscription.
Actual Behaviour
Terraform is attempting to recreate the service bus subscription(s) no matter how many times apply is run
Steps to Reproduce
Premium_SKU
and attempt to use that related topic in the creation of a service bus subscriptionImportant Factoids
No response
References
There was a similar bug/issue created, but was closed - #5131