az deployment: show a readable summary of deployment errors by default, with raw JSON on request
Related command
az deployment sub create (and az deployment group create, az deployment mg create, az deployment tenant create)
Is your feature request related to a problem? Please describe.
When a deployment fails, the CLI prints the full error JSON, including the nested details arrays, as one long block. That's useful for tooling, but hard to scan when a person reads it in a terminal or a pipeline log. We heard this from a customer: machine-readable JSON is useful, but a readable default with a switch for raw JSON would be better.
Describe the solution you'd like
By default, print a short summary of a failed deployment: the top-level error code and message, then one line per inner error with its code, message and the resource it applies to. Keep the full JSON available behind a flag, or when --output json is set, so scripts that parse it keep working.
Describe alternatives you've considered
Parsing the error JSON with jq or PowerShell in each pipeline, which every team ends up writing for itself.
Additional context
Filed by the Azure Deployments PM team from customer feedback.
route to service team