Azure Resource Graph – first steps

At Ignite 2018, Microsoft announced the availability of Azure Resource Graph. Link to Docs

So whats it all about ?

When running IT in Azure, it is sometimes necessary to know details from your Azure Resources and you typically query it via PowerShell, the CLI or the REST API directly.

Microsoft has figured out heavy load on their REST-API as people need to get information about their cloud-infrastructure very often. So what they did with Resource Graph is to create a cached version and provide the data via an Azure Serivice named Azure Data Explorer.

So lets make some experiments if this is really faster. I am using PowerShell Core 6.1 and the Az.* Modules. After logging in you my target subscription, i can do some tests.

Resource Graph – List all resources
Resource Manager – List all resources

AHA ! – why is that ? Resource Graph is slower ? Well, you may have experienced this as well, there must be some caching mechanism in the REST-API also. Whenever you do the same query the SECOND time, its much faster.

So maybe performance is not the main issue, just put the load away from the REST-API. Lets try some other examples from MS Docs.

Resource Graph provides richer data

Now lets compare the output for one VM between Graph and ARM

So what we learned is that Resource Graph shows more and better structured information that the REST-API. The Query Language makes it also interesting, because you can easily define your own queries which allows pre-filtering of information.

Go try something of this and wait for part 2 on this article.