๐ Handling Log Analytics Workspace Deletion with Replication Enabled
November 24, 2025 ยท View on GitHub
If redundancy (replication) is enabled for your Log Analytics workspace, you must disable it before deleting the workspace or resource group. Otherwise, deletion will fail.
โ Steps to Disable Replication Before Deletion
Run the following Azure CLI command. Note: This operation may take about 5 minutes to complete.
az resource update --ids "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{logAnalyticsName}" --set properties.replication.enabled=false
Replace:
{subscriptionId}โ Your Azure subscription ID{resourceGroupName}โ The name of your resource group{logAnalyticsName}โ The name of your Log Analytics workspace
Optional: Verify replication disabled (should output false):
az resource show --ids "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{logAnalyticsName}" --query properties.replication.enabled -o tsv
โ After Disabling Replication
You can safely delete:
- The Log Analytics workspace (manual)
- The resource group (manual), or
- All provisioned resources via
azd down
Return to: Deployment Guide