Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy of Arm Template with Logic Apps throws Error : Data sinks can’t be reused in different settings on the same category for the same resource

So I have setup a deployment of an Arm Template with some Logic Apps with some related diagnostic setting for Event hub, see img. Event Hub Settings

However, when deploying the same template again, we get the error: "Data sinks can’t be reused in different settings on the same category for the same resource".

And the solution is to remove the diagnostic settings before a new deploy. But I don't want to manually do this each time we do a new deploy.

Have someone figured out a workaround for this?

Thanks!

like image 771
Jesper Jonsson Avatar asked Oct 21 '25 04:10

Jesper Jonsson


1 Answers

You can either use PowerShell command or Azure CLI command to remove a diagnostic setting for the resource.

PowerShell command (You can find the documentation here):

Remove-AzDiagnosticSetting -ResourceId "Resource01" -Name myDiagSetting

Azure CLI command (You can find documentation here):

az monitor diagnostic-settings delete --name "myDiagSetting" --resource "Resource01"
like image 158
Jagrati Modi Avatar answered Oct 23 '25 01:10

Jagrati Modi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!