Skip to content

Commit 831d587

Browse files
KSchlobohmmjrousos
andauthored
Troubleshooting doc updates (#262)
- add troubleshooting tip into prod doc - add alternate troubleshooting error message text - fix group name reported in log by script - change to using AZD for single group tear down --------- Co-authored-by: Mike Rousos <[email protected]>
1 parent 8eafafc commit 831d587

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

infra/scripts/postprovision/call-create-app-registrations.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ fi
1111
# This script is run by azd pre-provision hook and is part of the deployment lifecycle run when deploying the code for the Relecloud web app.
1212
resourceGroupName=$((azd env get-values --output json) | jq -r .AZURE_RESOURCE_GROUP)
1313
14-
echo "Calling create-app-registrations.ps1 for group:'resourceGroupName'..."
14+
echo "Calling create-app-registrations.ps1 for group:'$resourceGroupName'..."
1515
1616
pwsh ./infra/scripts/postprovision/create-app-registrations.ps1 -ResourceGroupName $resourceGroupName -NoPrompt

prod-deployment.md

+1
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ The following detailed deployment steps assume you are using a Dev Container ins
262262
```pwsh
263263
azd deploy
264264
```
265+
> If you were unable to deploy due to [ERROR: getting target resource](troubleshooting.md#error-reauthentication-required-run-azd-auth-login---scope-httpsmanagementazurecomdefault-to-log-in)
265266
266267
It takes approximately 5 minutes to deploy the code.
267268

testscripts/cleanup.ps1

+7
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,13 @@ foreach ($resourceGroupName in $resourceGroups) {
378378
Remove-DiagnosticSettingsForResourceGroup -ResourceGroupName $resourceGroupName
379379
}
380380

381+
if ($azdConfig['ENVIRONMENT'] ?? 'dev' -eq "dev") {
382+
# when performing dev cleanup there are no dependencies between resource groups
383+
# existing at this point allows AZD to handle the tear down responsibilities
384+
"`nCleanup complete." | Write-Output
385+
exit 0
386+
}
387+
381388
# if $SkipResourceGroupDeletion is false, then we skip the resource group deletion
382389
# flag is expected to be set to false when combined with the `azd down` command
383390
if (-not $SkipResourceGroupDeletion) {

troubleshooting.md

+5
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,14 @@ This error can happen when you are using an account that has access to multiple
106106
107107
Depending on your workflow you may get a different error message for the same issue:
108108
109+
Option 1:
109110
```sh
110111
ERROR: resolving bicep parameters file: fetching current principal id: getting tenant id for subscription...
111112
```
113+
Option 2:
114+
```sh
115+
ERROR: getting target resource: getting service resource: resolving user access to subscription 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' : reauthentication required, run `azd auth login --scope https://management.azure.com//.default` to log in
116+
```
112117
113118
### Workaround
114119
You should complete the MFA experience for your default tenant, and the tenant that you wish to access by running both authentication commands:

0 commit comments

Comments
 (0)