`az group deployment --what-if` should haven option to return a non-zero exit code rather than having to parse the output.
Open
act-identity-squad
Auto-Assign
Azure Deployments
feature-request
Service Attention
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**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**
Contributor guide
Assessment
This issue has not been assessed yet.