Skip to content

Commit a8c0b96

Browse files
Add Log Analytics workspace deletion guide with replication steps
1 parent 6ab52b5 commit a8c0b96

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

docs/DeploymentGuide.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ Once you've opened the project in [Codespaces](#github-codespaces), [Dev Contain
185185
186186
> #### Important Note : Before accessing the application, ensure that all **[Post Deployment Steps](#post-deployment-steps)** are fully completed, as they are critical for the proper configuration of **Data Ingestion** and **Authentication** functionalities.
187187
188-
7. If you are done trying out the application, you can delete the resources by running `azd down`.
188+
6. If you are done trying out the application, you can delete the resources by running `azd down`.
189+
190+
**Note (Log Analytics Replication Enabled):** If you deployed with `enableRedundancy=true` and Log Analytics workspace replication is enabled, you must first disable replication before deletion or `azd down` else resource group delete will fail. Follow the steps in [Handling Log Analytics Workspace Deletion with Replication Enabled](./LogAnalyticsReplicationDisable.md), wait until replication returns `false`, then run `azd down` (or manually delete the resource group).
189191
190192
### 🛠️ Troubleshooting
191193
If you encounter any issues during the deployment process, please refer [troubleshooting](../docs/TroubleShootingSteps.md) document for detailed steps and solutions
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# 🛠 Handling Log Analytics Workspace Deletion with Replication Enabled
2+
3+
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.
4+
5+
## ✅ Steps to Disable Replication Before Deletion
6+
Run the following Azure CLI command. Note: This operation may take about 5 minutes to complete.
7+
8+
```bash
9+
az resource update --ids "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{logAnalyticsName}" --set properties.replication.enabled=false
10+
```
11+
12+
Replace:
13+
- `{subscriptionId}` → Your Azure subscription ID
14+
- `{resourceGroupName}` → The name of your resource group
15+
- `{logAnalyticsName}` → The name of your Log Analytics workspace
16+
17+
Optional: Verify replication disabled (should output `false`):
18+
```bash
19+
az resource show --ids "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{logAnalyticsName}" --query properties.replication.enabled -o tsv
20+
```
21+
22+
## ✅ After Disabling Replication
23+
You can safely delete:
24+
- The Log Analytics workspace (manual)
25+
- The resource group (manual), or
26+
- All provisioned resources via `azd down`
27+
28+
Return to: [Deployment Guide](./DeploymentGuide.md)

0 commit comments

Comments
 (0)