Created
March 21, 2023 12:26
-
-
Save johnybradshaw/13a5ab3a96bbfb6275692ea9933f799b to your computer and use it in GitHub Desktop.
Run this KQL in the Azure Resource Explorer to quickly out put all of the resources in a given tenant that would carry a cost as part of the Wiz platform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# KQL query to output the resource counts for Wiz to price against | |
Resources | |
| where type in ( | |
"microsoft.compute/virtualmachines", | |
"microsoft.containerservice/managedclusters", | |
"microsoft.web/sites", | |
"microsoft.storage/storageaccounts", | |
"microsoft.classicstorage/storageaccounts", | |
"microsoft.dbformysql/servers", | |
"microsoft.dbformysql/flexibleservers") | |
| extend ResourceType = case( | |
type == "microsoft.compute/virtualmachines", "Virtual Machines", | |
type == "microsoft.containerservice/managedclusters", "AKS Nodes", | |
type == "microsoft.web/sites" and kind startswith "functionapp", "Functions", | |
type == "microsoft.web/sites" and kind !startswith "functionapp", "Web Apps", | |
type =~ "microsoft.storage/storageaccounts" or type =~ "microsoft.classicstorage/storageaccounts", "Storage Accounts", | |
type in ("microsoft.dbformysql/servers", "microsoft.dbformysql/flexibleservers"), "MSSQL", | |
"Unknown") | |
| summarize Count = count() by ResourceType |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment