diff --git a/infra/scripts/postprovision/call-create-app-registrations.sh b/infra/scripts/postprovision/call-create-app-registrations.sh index 09fc541..72a9086 100755 --- a/infra/scripts/postprovision/call-create-app-registrations.sh +++ b/infra/scripts/postprovision/call-create-app-registrations.sh @@ -11,6 +11,6 @@ fi # 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. resourceGroupName=$((azd env get-values --output json) | jq -r .AZURE_RESOURCE_GROUP) -echo "Calling create-app-registrations.ps1 for group:'resourceGroupName'..." +echo "Calling create-app-registrations.ps1 for group:'$resourceGroupName'..." pwsh ./infra/scripts/postprovision/create-app-registrations.ps1 -ResourceGroupName $resourceGroupName -NoPrompt \ No newline at end of file diff --git a/prod-deployment.md b/prod-deployment.md index f30131e..688d24a 100644 --- a/prod-deployment.md +++ b/prod-deployment.md @@ -262,6 +262,7 @@ The following detailed deployment steps assume you are using a Dev Container ins ```pwsh azd deploy ``` + > 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) It takes approximately 5 minutes to deploy the code. diff --git a/testscripts/cleanup.ps1 b/testscripts/cleanup.ps1 index 46e5dff..ce064ef 100644 --- a/testscripts/cleanup.ps1 +++ b/testscripts/cleanup.ps1 @@ -378,6 +378,13 @@ foreach ($resourceGroupName in $resourceGroups) { Remove-DiagnosticSettingsForResourceGroup -ResourceGroupName $resourceGroupName } +if ($azdConfig['ENVIRONMENT'] ?? 'dev' -eq "dev") { + # when performing dev cleanup there are no dependencies between resource groups + # existing at this point allows AZD to handle the tear down responsibilities + "`nCleanup complete." | Write-Output + exit 0 +} + # if $SkipResourceGroupDeletion is false, then we skip the resource group deletion # flag is expected to be set to false when combined with the `azd down` command if (-not $SkipResourceGroupDeletion) { diff --git a/troubleshooting.md b/troubleshooting.md index a8d3f3a..8d3df9d 100644 --- a/troubleshooting.md +++ b/troubleshooting.md @@ -106,9 +106,14 @@ This error can happen when you are using an account that has access to multiple Depending on your workflow you may get a different error message for the same issue: +Option 1: ```sh ERROR: resolving bicep parameters file: fetching current principal id: getting tenant id for subscription... ``` +Option 2: +```sh +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 +``` ### Workaround You should complete the MFA experience for your default tenant, and the tenant that you wish to access by running both authentication commands: