Deployment Diagnostics
Synopsis​
Intended end result: Identify the first actionable root cause of failed or partial deployments.
How this page gets you there: Start with the highest-signal deployment script logs, then drill into operation details only if needed.
Use these commands when the deployment succeeds partially, a nested deployment fails, or the ACR bootstrap script is suspected.
Most likely root cause first​
If you only need the most likely root cause, start with deployment script logs first:
az deployment-scripts show-log --resource-group "ai4gl-condor-uat-rg" --name "acr-bootstrap-build"
Deep-dive flows​
PowerShell flow:
$deploymentName = 'main'
$resourceGroup = 'ai4gl-condor-uat-rg'
$subscriptionId = '<subscription-id>'
az deployment group operation list --subscription $subscriptionId --resource-group $resourceGroup --name $deploymentName -o json |
ConvertFrom-Json |
Where-Object { $_.properties.targetResource.id -match 'acr-bootstrap-build' }
az resource invoke-action --subscription $subscriptionId --resource-group $resourceGroup --name 'acr-bootstrap-build' --resource-type 'Microsoft.Resources/deploymentScripts' --action 'getStorageItems' --query 'properties[?name==`stdout.txt`]' -o json
Bash flow:
subscription_id="<subscription-id>"
resource_group="ai4gl-condor-uat-rg"
deployment_name="main"
script_name="acr-bootstrap-build"
az account set --subscription "$subscription_id"
az deployment operation sub list --name "$deployment_name" -o json 2>&1 | tee deployment-list.txt
az deployment operation sub list --name "$deployment_name" --query "[?contains(properties.targetResource.id, 'acrBootstrapBuild')]" -o json 2>&1 | tee acrBootstrapBuild.txt
az deployment-scripts show-log --resource-group "$resource_group" --name "$script_name" 2>&1 | tee deployment-script-log.txt
az deployment-scripts show --resource-group "$resource_group" --name "$script_name" -o json 2>&1 | tee deployment-script-metadata.txt