az resource list --tag does not return all expected values
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
## Describe the bug
When I list resource using the `--tag` I'm getting different result than if I were to list if with `--name` for example. Specifically I see missing `changedTime`, `createdTime` and `tags`
**Command Name**
`az resource list`
**Errors:**
```
{
"changedTime": null,
"createdTime": null,
"extendedLocation": null,
"id": "/subscriptions/8d026bb1-2a65-454d-a88f-c896db94c4f8/resourceGroups/TRAVIS-CI-OSBUILD-COMPOSER/providers/Microsoft.Compute/disks/disk-fedora_33-x86_64-PR-1539-1438472054",
"identity": null,
"kind": null,
"location": "westeurope",
"managedBy": null,
"name": "disk-fedora_33-x86_64-PR-1539-1438472054",
"plan": null,
"properties": null,
"provisioningState": null,
"resourceGroup": "TRAVIS-CI-OSBUILD-COMPOSER",
"sku": {
"capacity": null,
"family": null,
"model": null,
"name": "Standard_LRS",
"size": null,
"tier": "Standard"
},
"tags": null,
"type": "Microsoft.Compute/disks"
}
```
## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- Just create any resource in a resource group and add tag to it
- `az resource list --tag $TAG`
## Expected Behavior
This is what I get if I run `az resource list --name disk-fedora_33-x86_64-PR-1539-143847205` I would expect to get the same from the previous command. I also see it listed correctly if I list all resources in a resource group.
```
{
"changedTime": "2021-08-05T15:35:53.783125+00:00",
"createdTime": "2021-07-20T14:50:36.415077+00:00",
"extendedLocation": null,
"id": "/subscriptions/8d026bb1-2a65-454d-a88f-c896db94c4f8/resourceGroups/TRAVIS-CI-OSBUILD-COMPOSER/providers/Microsoft.Compute/disks/disk-fedora_33-x86_64-PR-1539-1438472054",
"identity": null,
"kind": null,
"location": "westeurope",
"managedBy": null,
"name": "disk-fedora_33-x86_64-PR-1539-1438472054",
"plan": null,
"properties": null,
"provisioningState": "Succeeded",
"resourceGroup": "TRAVIS-CI-OSBUILD-COMPOSER",
"sku": {
"capacity": null,
"family": null,
"model": null,
"name": "Standard_LRS",
"size": null,
"tier": "Standard"
},
"tags": {
"osbuild-composer-test": "test"
},
"type": "Microsoft.Compute/disks"
}
```
## Environment Summary
```
Linux-5.13.5-200.fc34.x86_64-x86_64-with-glibc2.33
Python 3.9.6
Installer: RPM
azure-cli 2.27.0
Extensions:
storage-preview 0.7.4
```
## Additional Context
Contributor guide
Assessment
This issue has not been assessed yet.