`az storage account [show/delete/create]` inconsistent across subscriptions
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Describe the bug**
`az storage account [show/delete/create]` seem to be inconsistent. I tried creating an account but got `(StorageAccountAlreadyTaken)`, but when I tried `show` on the account, I get `(ResourceNotFound)`.
**To Reproduce**
Create a resource group `rg` under subscription `s1`.
Create a storage account `sa` under `s1` and `rg`.
Create a resource group with the same name `rg` under a different subscription `s2`.
Attempt creating storage account with same name `sa` under `rg` and `s2`, you should get `(StorageAccountAlreadyTaken)`. But if you do `az storage account show -n sa -g rg --subscription s2`, you will get `(ResourceNotFound)`. Even after you do `az storage account delete -n sa -g rg --subscription s2`, `az storage account create-n sa -g rg --subscription s2` still yields `(StorageAccountAlreadyTaken)`.
**Expected behavior**
Storage accounts should be per subscription. The existence of a storage account with the same name under a different subscriptions should not affect the behavior of `show/create/delete` on them.
`delete` should inform the user whether the deletion was successful.
**Environment summary**
Install Method: pip
CLI version: 2.27
OS version: Windows-10-10.0.19042-SP0
Shell Type: Powershell
Contributor guide
Assessment
This issue has not been assessed yet.