Hi Monitor,
Could you please try the query below. Make sure to adjust the query according to your data.
Resources
| where type =~ 'microsoft.compute/virtualMachines' or type =~ 'microsoft.compute/disks'
| project id, name, type, resourceGroup, location, tags, properties
| join (
Resources
| where type =~ 'microsoft.compute/disks' and properties.replicationStatus =~ 'Replicating'
| project diskId, vmId, diskName, diskTags, properties
) on id
| project vmId, vmName = name, vmTags = tags, vmLocation = location, vmResourceGroup = resourceGroup, vmType = type, vmProperties = properties, diskId, diskName, diskTags, diskLocation = location, diskResourceGroup = resourceGroup, diskType = type, diskProperties = properties
If the information is helpful, please consider by clicking the "Accept answer and Upvote" on the post. If you are still facing any issue, please let us know in the comments.
Thank you.