`az storage container immutability-policy create` fails with error `Parameter 'resource_group_name' can not be None.`
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
## Describe the bug
The azure storage immutable-policy creation command throws parameter cannot be none error when **optional** parameter "resource-group" is not provided. Issue occurring from azure-cli 2.29.1 onwards and didn't occur in previous versions.
[Immutable-policy creation documentation ](https://docs.microsoft.com/en-us/cli/azure/storage/container/immutability-policy?view=azure-cli-latest#az_storage_container_immutability_policy_create) clearly shows the `--resource-group` as an optional parameter, and was working as expected for previous azure-cli versions.
**Command Name**
`az storage container immutability-policy create`
**Errors:**
```
Parameter 'resource_group_name' can not be None.
```
## To Reproduce:
Steps to reproduce the behavior.
- `az storage container immutability-policy create --account-name {} --container-name {} --period {}`
## Expected Behavior
The `az storage container immutability-policy create` command should create the immutable policy as expected even without passing the optional `resource-group` parameter.
## Environment Summary
```
Installer: MSI
azure-cli 2.29.1
```
Contributor guide
Assessment
This issue has not been assessed yet.