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.
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=falseReplace:
{subscriptionId}→ Your Azure subscription ID{resourceGroupName}→ The name of your resource group{logAnalyticsName}→ The name of your Log Analytics workspace
Optional: Verify replication is disabled (should output false):
az resource show --ids "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{logAnalyticsName}" --query properties.replication.enabled -o tsvYou can safely delete:
- The Log Analytics workspace (manual)
- The resource group (manual), or
- All provisioned resources via
azd down
Return to: Deployment Guide