Azure / Azure/azure-cli

Add integer exit code for 'az deployment group what-if' command

Open
#21,468 5 comments 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
act-identity-squad ARM Auto-Assign feature-request Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Is your feature request related to a problem? Please describe.**
When using the what-if feature in a deployment pipeline, it would be much easier to parse an integer exitcode that many lines of text. In a similar way to the Terraform command's [--detailed-exitcode](https://www.terraform.io/cli/commands/plan#detailed-exitcode) flag, which returns 0,1 or 2. This would allow a pipeline script to easily detect whether changes have occurred and make a decision based on the exitcode. The current Azure CLI requires iterating through results to check for drift. Checking the exit code is more standard and stable.

**Describe the solution you'd like**
A new parameter/flag to produce an integer from the what-if command to provide easy parsing to the consumer.

**Describe alternatives you've considered**
Parsing the 'what-if' textual output myself, which is error prone

**Additional context**
None

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.