-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
f8704c2
commit 942e352
Showing
1 changed file
with
12 additions
and
9 deletions.
There are no files selected for viewing
21 changes: 12 additions & 9 deletions
21
azure-resources/Network/virtualNetworkGateways/kql/bbe668b7-eb5c-c746-8b82-70afdedf0cae.kql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
// Azure Resource Graph Query | ||
// For all VNGs of type ExpressRoute, show any that do not have AZ in the SKU tier | ||
resources | ||
| where type =~ "Microsoft.Network/virtualNetworkGateways" | ||
| where location in~ ("australiaeast", "brazilsouth", "canadacentral", "centralindia", "centralus", "eastasia", "eastus", "eastus2", "francecentral", "germanywestcentral", "israelcentral", "italynorth", "japaneast", "japanwest", "koreacentral", "mexicocentral", "newzealandnorth", "northeurope", "norwayeast", "polandcentral", "qatarcentral", "southafricanorth", "southcentralus", "southeastasia", "spaincentral", "swedencentral", "switzerlandnorth", "uaenorth", "uksouth", "westeurope", "westus2", "westus3", "usgovvirginia", "chinanorth3") | ||
| where properties.gatewayType == "ExpressRoute" | ||
| where properties.sku.tier !contains 'AZ' | ||
| project recommendationId = "bbe668b7-eb5c-c746-8b82-70afdedf0cae", name, id, tags, param1= strcat("sku-tier: " , properties.sku.tier), param2=location | ||
| order by id asc | ||
|
||
// For all VNGs of type ExpressRoute, show all that are not zone redundant (Zonal or Regional) | ||
advisorresources | ||
| where properties.recommendationTypeId == 'c9af1ef6-55bc-48af-bfe4-2c80490159f8' // RecommendationID from Advisor | ||
| mv-expand resId = properties.resourceMetadata.resourceId | ||
| extend resId = tostring(resId) | ||
| project recId = properties.recommendationTypeId, resId | ||
| join kind=leftouter ( | ||
resources | ||
| extend id = tostring(id) | ||
| project id, name, tags, location, properties | ||
) on $left.resId == $right.id | ||
| project recommendationId = "bbe668b7-eb5c-c746-8b82-70afdedf0cae", name , resId, tags, param1 = strcat("sku-tier: ", properties.sku.tier), param2 = location,param3 = "Non Zone-Redundant GW" |