Azure / Azure/azure-cli

`az storage container immutability-policy create` fails with error `Parameter 'resource_group_name' can not be None.`

Open
#19,972 1 comment 0 reactions 1 assignee Claimed by @evelyn-ys View on GitHub
act-codegen-extensibility-squad feature-request Storage
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

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.