Skip to content

Commit 5e95ee4

Browse files
committed
Enhance Copilot Cheat Sheet with detailed AZD deployment error handling and command failure checks
1 parent a7435cf commit 5e95ee4

File tree

1 file changed

+44
-4
lines changed

1 file changed

+44
-4
lines changed

docs/copilot_cheat_sheet.md

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,60 @@ This cheat sheet provides a quick reference for workshop proctors on the differe
66

77
---
88

9+
## General Command Failures
10+
11+
- [] Ensure the user is in PowerShell 7 in the Windows Terminal
12+
- [] Ensure the user is in the correct folder ($env:USERPROFILE/aks-store-demo)
13+
914
## AZD Deployment Failure
1015

1116
The `azd` deployment can potentially fail if the availability zones in the region where the resources are being deployed change availability.
1217

13-
There are currently overrides for the few restrictions that have been found during the course development, but if a user has a problem, they can add an override using the availability zones mentioned in the error response.
18+
You will see an error like:
19+
20+
```text
21+
ERROR: error executing step command 'provision': deployment failed: error deploying infrastructure: validating deployment to resource group:
22+
23+
Validation Error Details:
24+
POST https://management.azure.com/subscriptions/<SUBSCRIPTION_ID>/resourcegroups/<RESOURCE_GROUP_NAME>/providers/Microsoft.Resources/deployments/aitour-1761061937/validate
25+
26+
--------------------------------------------------------------------------------
27+
RESPONSE 400: 400 Bad Request
28+
ERROR CODE: InvalidTemplateDeployment
29+
--------------------------------------------------------------------------------
1430
31+
{
32+
"error": {
33+
"code": "InvalidTemplateDeployment",
34+
"message": "The template deployment 'aitour-1761061937' is not valid according to the validation procedure. The tracking id is '421aa3c7-aae7-4257-8a36-a6db46f5fd0d'. See inner errors for details.",
35+
"details": [
36+
{
37+
"code": "AvailabilityZoneNotSupported",
38+
"message": "Preflight validation check for resource(s) for container service aks-aitourrkdg in resource group <RESOURCE_GROUP_NAME> failed. Message: The zone(s) '1' for resource 'system' is not supported. The supported zones for location 'eastus2' are '3,2'. Details: "
39+
}
40+
]
41+
}
42+
}
43+
--------------------------------------------------------------------------------
1544
```
45+
46+
There are currently overrides for the few restrictions that have been found during the course development, but if a user has a problem, they can add an override using the availability zones mentioned in the error response.
47+
48+
```powershell
1649
$Overrides = @{
1750
"eastus2" = @{"zones" = ("2", "3")}
1851
"westus2" = @{"zones" = @("3")}
1952
"eastus" = @{"zones" = ("2", "1")}
20-
# Add the problem region here, with the valid zones mentioned in the error.
53+
# Replace REGION with the problem region in the sample below, adjusting to the the valid zones mentioned in the error message.
54+
# then, uncomment and paste this section into the terminal
55+
# "REGION" = @{"zones" = ("3", "2", "1")}
2156
}
57+
```
58+
59+
Then, replace REGION with your region in the snippet below and run the below commands.
2260

23-
# Then, rerun
24-
$zones = $Overrides['<AZURE_LOCATION>'].zones -join ', '
61+
```powershell
62+
$zones = $Overrides['REGION'].zones -join ', '
2563
azd env set AKS_AVAILABILITY_ZONES $zones
2664
2765
# retry the deployment
@@ -30,6 +68,8 @@ azd up
3068

3169
---
3270

71+
# Lab Exercise Notes
72+
3373
## 1. Copilot in Azure Portal
3474

3575
### Context: Resource Group Analysis

0 commit comments

Comments
 (0)