Capturing Azure Resource Information (Kusto)

https://www.pexels.com/photo/mechanics-fixing-an-engine-7564869/
https://www.pexels.com/photo/mechanics-fixing-an-engine-7564869/

 In this blog, we continue working on getting Azure Resource information from where we left off in the previous blog. Here are have a subscription identifier and we gather all the resource groups, resources, changes on these resources and their policy information.

The code is in this repo.

These are the tables that we are pulling information from.

  1. resourcecontainers
  2. resources
  3. resourcechanges
  4. policyresources
The queries can be found here. And the code that linked all the resource information into one piece.
The output can be output to a json format.
subscription
  |- resource-group*
    |- resource*
       |- changes*
       |- policies*

Here is a screenshot (partial) of a resource under a resource group


The code base is very small. And Azure provides Python API for all the queries.




Comments