I have created a Service Bus Namespace in Azure using the ARM template. In that I have created multiple topics and subscriptions along with filters.
"type": "Microsoft.ServiceBus/namespaces/topics/subscriptions/rules",
"apiVersion": "2021-06-01-preview",
"name": "[concat(parameters('servicebus_name'), '/XXXXXXXXXXXXX/XXXXXXXXXXXXX/XXXXXXXXXXXXX')]",
"location": "[parameters('location')]",
"dependsOn": [
"[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', parameters('servicebus_name'), 'XXXXXXXXXXXXX', 'XXXXXXXXXXXXX')]",
"[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('servicebus_name'), 'XXXXXXXXXXXXX)]",
"[resourceId('Microsoft.ServiceBus/namespaces', parameters('servicebus_name'))]"
],
"properties": {
"action": {},
"filterType": "CorrelationFilter",
"correlationFilter": {
"label": "XXXXXXXXXXXXX"
}
}
}
I tried to delete the few filters by removing the code from the ARM template. But still, those filters will exist in the Azure portal. and also tried to rename the few filters by changing the names of the filters, but the names couldn't be changed.
I want to delete a few filters and rename a few filters (Filter Type: Correlation Filter).
Is it possible to delete the filters and rename the filters using the ARM template?
Note: I don’t want to use complete deployment mode to deploy the Service Bus ARM template.
Approach-1:
- Created filters.(Demo123PRADEEP, Demo456PRADEEP,Demo111PRADEEP)
- Deployed the initial ARM template.
- Changed the names of the above filters, Demo123PRADEEP and Demo456PRADEEP, to Demo123Pradeep and Demo456Pradeep, respectively.
- Removed the Demo111PRADEEP filter code from the ARM template.
- Re-applied all of the changes.
- Filter names can't be updated, and the above two filters are not deleted.