azureservicebusazure-resource-managerazure-servicebus-subscriptions

ARM template deploy to ASB without message loss


I have two ASB topic subscriptions which are updated using an ARM template, they are both against the same topic. Lets call them subscription_1 (existing) and subscription_2 (new). I don't want to lose any messages, and want to delete subcription_1 and create subscription_2 in the same ARM template deploy. To not lose messages I would need to ensure subscription_2 was added before subscription_1 was removed. Is there any way to do this in a single arm template deploy?


Solution

  • I realised as Thomas said what I was asking was daft. The old subscriptions will not get deleted if they are not present in the new arm template as long as deploying in incremental mode. The old ones can be cleared up manually after running the template in. This way it doesn't require multiple runs.