Azure / Azure/azure-cli-extensions
resource-graph query with count no longer working as expected
- Dominant language
- Python
- Stars
- 454
- Forks
- 1.7k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 64
Description
### Extension name (the extension in question)
resource-graph 2.1.0 , last known version to work 1.1.0
```
$ az version
{
"azure-cli": "2.30.0",
"azure-cli-core": "2.30.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"resource-graph": "2.1.0",
"ssh": "0.1.8"
}
```
### Description of issue (in as much detail as possible)
Version 2.1.0 - not working properly:
```
$ az graph query -q "project id, name, type | where type =~ 'Microsoft.Compute/virtualMachines' and name =~ 'hostname' | count" -o tsv
1 1 None 1
$ az graph query -q "project id, name, type | where type =~ 'Microsoft.Compute/virtualMachines' and name =~ 'hostname' | count"
{
"count": 1,
"data": [
{
"Count": 1
}
],
"skip_token": null,
"total_records": 1
}
```
Working version 1.1.0
```
$ az graph query -q "project id, name, type | where type =~ 'Microsoft.Compute/virtualMachines' and name =~ 'hostname' | count"
[
{
"Count": 1
}
]
$ az graph query -q "project id, name, type | where type =~ 'Microsoft.Compute/virtualMachines' and name =~ 'hostname' | count" -o tsv
1
```
I would expect count to show (especially in tsv output), just a "1" in this case for a single record.
-----
Contributor guide
Assessment
This issue has not been assessed yet.