`az network vnet list` --resource-group filter does not seem to be working
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
## Describe the bug
**Command Name**
`az network vnet list --resource-group ...`
**Errors:**
No errors, the command just returns an empty array even though vnets are present in the resource group.
## To Reproduce:
(I'm using PowerShell in the steps below)
- $ResourceGroup = "my-resource-group"
- `az network vnet list --resource-group $ResourceGroup`
Output:
```
[]
```
Note that if I use a JMES query to do the filtering, it works:
```
az network vnet list --query "[?resourceGroup=='$ResourceGroup'].resourceGroup"
[
"my-resource-group"
]
```
## Expected Behavior
When using the `--resource-group` argument I would expect the results returned to include the vnets in the specified resource group.
## Environment Summary
```
Windows-10-10.0.19041-SP0
Python 3.8.9
Installer: MSI
azure-cli 2.26.1
Extensions:
aks-preview 0.5.23
application-insights 0.1.13
databricks 0.7.2
Note that I have also tried this on a machine with no extensions installed and the problem is still present.
```
## Additional Context
Contributor guide
Assessment
This issue has not been assessed yet.