Azure / Azure/azure-cli

`az-cli list` is unaccurate compare to `az-cli show`

Open
#27,702 5 comments 1 reaction 0 assignees View on GitHub
act-quality-productivity-squad Auto-Assign Auto-Resolve Azure CLI Team customer-reported Network Network - DNS question Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

When displaying attributes values with `az-cli list`, some values are false regarding the result of `az-cli show`
The `show` command is the true one (because i double check with JOSN view in azure portal).

Below an example with private dns zones (i did not test with other resources), you could observe that the `numberOfVirtualNetworkLinks` values are not the same even if it is the same resource.

### Related command

az network private-dns zone list -g `your_rg`
```
$ az network private-dns zone list -g rg-...-001

[
{
"etag": "95...7ce",
"id": "/subscriptions/65...e/resourceGroups/rg-...-001/providers/Microsoft.Network/privateDnsZones/privatelink.blob.core.windows.net",
"location": "global",
[...]
"type": "Microsoft.Network/privateDnsZones"
},
{
"etag": "95...7ce",
"id": "/subscriptions/65...e/resourceGroups/rg-...-001/providers/Microsoft.Network/privateDnsZones/privatelink.dfs.core.windows.net",
"location": "global",
[...]
"type": "Microsoft.Network/privateDnsZones"
},
{
"etag": "95...7ce",
"id": "/subscriptions/65...e/resourceGroups/rg-...-001/providers/Microsoft.Network/privateDnsZones/privatelink.snowflakecomputing.com",
"location": "global",
"maxNumberOfRecordSets": 25000,
"maxNumberOfVirtualNetworkLinks": 1000,
"maxNumberOfVirtualNetworkLinksWithRegistration": 100,
"name": "privatelink.snowflakecomputing.com",
"numberOfRecordSets": 6,
"numberOfVirtualNetworkLinks": 0, //<================== FALSE !!!
"numberOfVirtualNetworkLinksWithRegistration": 0,
"provisioningState": "Succeeded",
"resourceGroup": "rg-weu-dea-hpr-network-c2-001",
"tags": {
"deployment": "manual"
},
"type": "Microsoft.Network/privateDnsZones"
}
]
```
az network private-dns zone show -g `your_rg` -n `your_pdz`
```
$ az network private-dns zone show -g rg-...-001 -n privatelink.snowflakecomputing.com
{
"etag": "95...7ce",
"id": "/subscriptions/65...e/resourceGroups/rg-...-001/providers/Microsoft.Network/privateDnsZones/privatelink.snowflakecomputing.com",
"location": "global",
"maxNumberOfRecordSets": 25000,
"maxNumberOfVirtualNetworkLinks": 1000,
"maxNumberOfVirtualNetworkLinksWithRegistration": 100,
"name": "privatelink.snowflakecomputing.com",
"numberOfRecordSets": 6,
"numberOfVirtualNetworkLinks": 1, //<================== TRUE !!!
"numberOfVirtualNetworkLinksWithRegistration": 0,
"provisioningState": "Succeeded",
"resourceGroup": "rg-weu-dea-hpr-network-c2-001",
"tags": {
"deployment": "manual"
},
"type": "Microsoft.Network/privateDnsZones"
}
```

### Errors

No error message, values are *just* wrong.

### Issue script & Debug output

Please check above

### Expected behavior

The values should be the same whatever the command used

### Environment Summary

```
cloudhsell$ az --version
azure-cli 2.53.0 *
```

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.