Set account name but not key.
$ export AZURE_STORAGE_ACCOUNT=mystorageaccount
After running $ az storage blob list -c vhds, I expect an error saying storage key not specified or similar but instead, I get the following.
$ az storage blob list -c vhds
usage: az storage blob list [-h] [--output {json,tsv,list,table,jsonc}]
[--verbose] [--debug] [--query JMESPATH]
--container-name CONTAINER_NAME
[--timeout TIMEOUT] [--account-name ACCOUNT_NAME]
[--marker MARKER] [--sas-token SAS_TOKEN]
[--connection-string CONNECTION_STRING]
[--num-results NUM_RESULTS] [--include INCLUDE]
[--delimiter DELIMITER]
[--account-key ACCOUNT_KEY] [--prefix PREFIX]
az storage blob list: error: 'NoneType' object has no attribute 'id'
The bug is in _validators.py, acc_id = next((x for x in scf.storage_accounts.list() if x.name == n.account_name), None).id.
If n.account_name isn't in the storage accounts list, the iterator will return None and so 'NoneType' object has no attribute 'id'
Set account name but not key.
After running
$ az storage blob list -c vhds, I expect an error saying storage key not specified or similar but instead, I get the following.The bug is in _validators.py,
acc_id = next((x for x in scf.storage_accounts.list() if x.name == n.account_name), None).id.If n.account_name isn't in the storage accounts list, the iterator will return None and so
'NoneType' object has no attribute 'id'