Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/CustomizingAzdParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ By default this template will use the environment name as the prefix to prevent
| Name | Type | Default Value | Purpose |
| -----------------------------| ------- | ------------------- | ---------------------------------------------------------------------------------------------------- |
| `AZURE_ENV_NAME` | string | `azdtemp` | Used as a prefix for all resource names to ensure uniqueness across environments. |
| `AZURE_ENV_COSMOS_LOCATION` | string | `eastus2` | Location of the Cosmos DB instance. Choose from (allowed values: `swedencentral`, `australiaeast`). |
| `AZURE_ENV_COSMOS_LOCATION` | string | `Same as resource group location` | Primary location for the Cosmos DB instance. When enabling redundancy, verify the region supports zone redundancy. [Check supported regions](https://learn.microsoft.com/en-us/azure/reliability/regions-list). |
| `AZURE_ENV_COSMOS_SECONDARY_LOCATION` | string | `canadacentral` | Secondary failover location for Cosmos DB when enableRedundancy is true. [Check supported regions](https://learn.microsoft.com/en-us/azure/reliability/regions-list). |
Comment on lines +13 to +14
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation correctly describes the new AZURE_ENV_COSMOS_SECONDARY_LOCATION parameter, but there's a minor inconsistency:

Line 13 states the primary Cosmos location defaults to "Same as resource group location", but the actual Bicep code (infra/main.bicep:13) uses resourceGroup().location which is the same thing. However, the description could be clearer by stating it explicitly matches the AZURE_LOCATION value when not specified, since users set AZURE_LOCATION to determine the resource group location.

Also consider clarifying that both locations should support zone redundancy when enableRedundancy=true, as mentioned in the link provided.

Suggested change
| `AZURE_ENV_COSMOS_LOCATION` | string | `Same as resource group location` | Primary location for the Cosmos DB instance. When enabling redundancy, verify the region supports zone redundancy. [Check supported regions](https://learn.microsoft.com/en-us/azure/reliability/regions-list). |
| `AZURE_ENV_COSMOS_SECONDARY_LOCATION` | string | `canadacentral` | Secondary failover location for Cosmos DB when enableRedundancy is true. [Check supported regions](https://learn.microsoft.com/en-us/azure/reliability/regions-list). |
| `AZURE_ENV_COSMOS_LOCATION` | string | `AZURE_LOCATION` (resource group location) | Primary location for the Cosmos DB instance. Defaults to the value of `AZURE_LOCATION` (the resource group location). **If `enableRedundancy=true`, this region must support zone redundancy.** [Check supported regions](https://learn.microsoft.com/en-us/azure/reliability/regions-list). |
| `AZURE_ENV_COSMOS_SECONDARY_LOCATION` | string | `canadacentral` | Secondary failover location for Cosmos DB when `enableRedundancy` is true. **This region must also support zone redundancy if `enableRedundancy=true`.** [Check supported regions](https://learn.microsoft.com/en-us/azure/reliability/regions-list). |

Copilot uses AI. Check for mistakes.
| `AZURE_ENV_MODEL_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Change the Model Deployment Type (allowed values: Standard, GlobalStandard). |
| `AZURE_ENV_MODEL_NAME` | string | `gpt-4o-mini` | Set the GPT model name (allowed values: `gpt-4o`). |
| `AZURE_ENV_MODEL_VERSION` | string | `2025-01-01-preview` | Set the Azure OpenAI API version (allowed values: 2024-08-06). |
Expand Down
3 changes: 2 additions & 1 deletion docs/DeploymentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ Once you've opened the project in [Codespaces](#github-codespaces), [Dev Contain
5. Once the deployment is complete, please follow the [Import Sample Data](#post-deployment-steps) instructions under **Post Deployment Steps** to load the sample data correctly.
6. Open the [Azure Portal](https://portal.azure.com/), go to the deployed resource group, find the App Service and get the app URL from `Default domain`.
7. Test the app locally with the sample question with any selected client: _Show latest asset value by asset type?_. For more sample questions you can test in the application, see [Sample Questions](SampleQuestions.md).
8. You can now delete the resources by running `azd down`, if you are done trying out the application.
8. You can now delete the resources by running `azd down`, if you are done trying out the application.
> **Note:** If you deployed with `enableRedundancy=true` and Log Analytics workspace replication is enabled, you must first disable replication before running `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`.
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note added about disabling Log Analytics replication is helpful and necessary. However, there's a minor grammatical issue in the sentence structure.

The phrase "else resource group delete will fail" should be "otherwise resource group deletion will fail" for better clarity and grammatical correctness.

Suggested change
> **Note:** If you deployed with `enableRedundancy=true` and Log Analytics workspace replication is enabled, you must first disable replication before running `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`.
> **Note:** If you deployed with `enableRedundancy=true` and Log Analytics workspace replication is enabled, you must first disable replication before running `azd down`, otherwise resource group deletion 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`.

Copilot uses AI. Check for mistakes.

### Publishing Local Build Container to Azure Container Registry

Expand Down
28 changes: 28 additions & 0 deletions docs/LogAnalyticsReplicationDisable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 🛠 Handling Log Analytics Workspace Deletion with Replication Enabled

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.

```bash
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 is disabled (should output `false`):
```bash
az resource show --ids "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{logAnalyticsName}" --query properties.replication.enabled -o tsv
```
Comment on lines +8 to +20
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guide provides clear instructions for disabling Log Analytics replication before deletion. However, there's a potential improvement:

The command on line 9 uses a hardcoded resource ID template. Consider adding a note that users can find their actual resource ID from the Azure Portal or by running:

az monitor log-analytics workspace show --workspace-name {logAnalyticsName} --resource-group {resourceGroupName} --query id -o tsv

This would help users who might struggle with manually constructing the resource ID.

Copilot uses AI. Check for mistakes.

## ✅ 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](./DeploymentGuide.md)
Loading