Azure / Azure/azure-cli

Azure CLI allows the creation of Premium Block Blob Storage with Hot and Cool Access Tiers

Open
#27,843 3 comments 0 reactions 1 assignee Assigned to @calvinhzy View on GitHub
act-codegen-extensibility-squad Auto-Assign customer-reported question Service Attention Storage
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

The following command works with the Azure CLI:
```
az storage account create -g rg-blue-ingress-v1 -n asdfq25g7ncnrmssrw85gn2g --sku Premium_LRS --kind BlockBlobStorage --access-tier Hot
```
According to the [docs](https://learn.microsoft.com/en-us/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-create-optional-parameters) on Optional Parameters, the `--access-tier` flag should implicitly be `Premium` (likely null in the JSON representation of the Storage Account), and that it cannot be changed.

The above command changes the access tier to "Hot".

You can do the same for the "Cool" access tier:
```
az storage account create -g rg-blue-ingress-v1 -n asdfq25g7ncnrmssrw85gn2g --sku Premium_LRS --kind BlockBlobStorage --access-tier Cool
```

### Related command

az storage account create -g rg-blue-ingress-v1 -n asdfq25g7ncnrmssrw85gn2g --sku Premium_LRS --kind BlockBlobStorage --access-tier Hot

### Errors

No errors. The Storage Account gets created and the improper access tier can be inspected from the Azure Portal.

### Issue script & Debug output

Too much effort.

### Expected behavior

The Azure CLI, for Storage Account creation, shouldn't allow the `--access-tier` flag to be set (or allow any values other than say `Premium`) when the `--kind` flag is set to `BlockBlobStorage`.

### Environment Summary

azure-cli 2.54.0

core 2.54.0
telemetry 1.1.0

Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2

### Additional context

_No response_

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.