Skip to content

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

@cbellee

Description

@cbellee

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 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

Metadata

Metadata

Assignees

Labels

ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botService AttentionThis issue is responsible by Azure service team.act-identity-squadfeature-request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions