Azure CLI is unable to query resource groups with dashes in their resource group name
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
## Describe the bug
Unable to query for resource groups with dashes in their name. This is required to check the existence of a resource group. ` az group show --resource-group kubernetes-cluster` would return an error if the resource group does not exist, making it difficult to determine if the error was due to the resource group not existing or some other error.
## To Reproduce:
```
$ az group list --query [?name=="kubernetes-cluster"]
argument --query: invalid jmespath_type value: '[?name==kubernetes-cluster]'
To learn more about --query, please visit: 'https://docs.microsoft.com/cli/azure/query-azure-cli'
```
## Expected Behavior
A list containing one element, which is the resource group named "kubernetes-cluster" or 0 elements if no such group exists.
## Environment Summary
```
Windows-10-10.0.17763-SP0
Python 3.8.9
Installer:
azure-cli 2.29.1
Extensions:
aks-preview 0.5.32
front-door 1.0.16
## Additional Context
Contributor guide
Assessment
This issue has not been assessed yet.