Azure / Azure/azure-cli

az policy definition create --rules not optional

Open
#22,638 1 comment 0 reactions 2 assignees Claimed by @cxznmhdcxz View on GitHub
act-identity-squad ARM Auto-Assign feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

When trying to create a policy definition with the Azure CLI without specifying rules, an error appears saying "--rules is required", though the rules flag is specified in the documentation as optional.

![image](https://user-images.githubusercontent.com/7830838/170531875-8d26db0c-e79d-4b48-8118-6b07a8999d16.png)

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 436bf02d-dfe3-ef6e-2be8-1bd7b1f39623
* Version Independent ID: e8b92df3-9e3d-c4c7-1965-0b6b3f7d00ea
* Content: [az policy definition](https://docs.microsoft.com/en-us/cli/azure/policy/definition?view=azure-cli-latest#az-policy-definition-create)
* Content Source: [latest/docs-ref-autogen/policy/definition.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/latest/docs-ref-autogen/policy/definition.yml)
* Service: **azure-resource-manager**
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**

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.