0

Team,

I'm using the below query to list all the resources in my subscription. But whereas resourcetype is coming as null. but all other parameters are coming fine. Can someone help to suggest.

az resource  list --query "[].{resourceGroup:resourceGroup,resourcetype:resourcetype,name:name,location:location,env:tags.Environment,appname:tags.ApplicationName,appmaintainedby:tags.AppMaintainedBy,tcs_scope:tags.TCSCloudOps_Scope,costcenter:tags.BusinessUnit_CostCenter,hpnum:tags.HPNumber}" 

az resource  list --query "[].{resourceGroup:resourceGroup,resource-type:resource-type,name:name,location:location,env:tags.Environment,appname:tags.ApplicationName,appmaintainedby:tags.AppMaintainedBy,tcs_scope:tags.TCSCloudOps_Scope,costcenter:tags.BusinessUnit_CostCenter,hpnum:tags.HPNumber}" 
pugmarx
  • 7,323
  • 3
  • 30
  • 40
Rajesh
  • 1

1 Answers1

0

Can you try using the "resourcetype:type" instead of "resourcetype:resourcetype" in the above command refer the below screenshot for the reference. enter image description here

VenkateshDodda
  • 4,723
  • 1
  • 3
  • 12