Skip to content

Commit 8554694

Browse files
Rodrigo Reis Santos (AZURE)Rodrigo Reis Santos (AZURE)
authored andcommitted
updating-publicips-according-to-PG
1 parent b0ad459 commit 8554694

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

azure-resources/Network/loadBalancers/kql/621dbc78-3745-4d32-8eac-9e65b27b7512.kql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ resources
2727
| join kind=innerunique (
2828
resources
2929
| where type == "microsoft.network/publicipaddresses"
30-
| 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")
30+
| where location in~ ("centralindia", "centralus", "eastus", "japaneast", "japanwest","newzealandnorth", "southcentralus", "southeastasia", "switzerlandnorth","uaenorth", "westeurope", "westus3", "usgovvirginia", "chinanorth3")
3131
| where isnull(zones) or array_length(zones) < 2
3232
| extend
3333
LBid = toupper(substring(properties.ipConfiguration.id, 0, indexof(properties.ipConfiguration.id, '/frontendIPConfigurations'))),

azure-resources/Network/publicIPAddresses/kql/c63b81fb-7afc-894c-a840-91bb8a8dcfaf.kql

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
// Azure Resource Graph query
22
// List public IP addresses that are not Zone-Redundant
3-
Resources
3+
resources
44
| where type =~ "Microsoft.Network/publicIPAddresses" and sku.tier =~ "Regional"
5-
| 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")
6-
| where isempty(zones) or array_length(zones) <= 1
5+
| where
6+
(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")
7+
and array_length(zones) <= 1)
8+
or
9+
(location in~ ("centralindia", "centralus", "eastus", "japaneast", "japanwest", "newzealandnorth","southcentralus", "southeastasia", "switzerlandnorth", "uaenorth", "westeurope", "westus3","usgovvirginia", "chinanorth3")
10+
and (isempty(zones) or array_length(zones) <= 1))
711
| extend az = case(isempty(zones), "Non-zonal", array_length(zones) <= 1, strcat("Zonal (", strcat_array(zones, ","), ")"), zones)
812
| project recommendationId = "c63b81fb-7afc-894c-a840-91bb8a8dcfaf", name, id, tags, param1 = strcat("sku: ", sku.name), param2 = strcat("availabilityZone: ", az)
9-

azure-resources/Network/virtualNetworkGateways/kql/4bae5a28-5cf4-40d9-bcf1-623d28f6d917.kql

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ resources
99
| extend pipId = tostring(ipconfig.properties.publicIPAddress.id)
1010
| join kind=inner (
1111
resources
12-
| 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")
1312
| where type == "microsoft.network/publicipaddresses"
14-
| where isnull(zones) or array_length(zones) < 3 )
13+
| where
14+
(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")
15+
and array_length(zones) <= 1)
16+
or
17+
(location in~ ("centralindia", "centralus", "eastus", "japaneast", "japanwest", "newzealandnorth","southcentralus", "southeastasia", "switzerlandnorth", "uaenorth", "westeurope", "westus3","usgovvirginia", "chinanorth3")
18+
and (isempty(zones) or array_length(zones) <= 1)))
1519
on $left.pipId == $right.id
1620
| project recommendationId = "4bae5a28-5cf4-40d9-bcf1-623d28f6d917", name, id, tags, param1 = strcat("PublicIpAddressName: ", name1), param2 = strcat ("PublicIpAddressId: ",id1), param3 = strcat ("PublicIpAddressTags: ",tags1)
17-

0 commit comments

Comments
 (0)