Skip to content

az group deployment --what-if should haven option to return a non-zero exit code rather than having to parse the output. #22737

@cbellee

Description

@cbellee

Related command
az deployment group create

Is your feature request related to a problem? Please describe.
I don't want to parse the --what-if text output.

Describe the solution you'd like
Add an additional flag to az deployment group create to control --what-if output. Return an integer indicating the result rather than text. For example, like Terraform's -detail-exitcode parameter.

0 = Succeeded with empty diff (no changes)
1 = Error
2 = Succeeded with non-empty diff (changes present)

Describe alternatives you've considered
Parsing the output with a script, which is pretty ugly.

Additional context

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions