Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
lb-2 query fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneHezser committed Aug 18, 2023
1 parent ee99969 commit 0a909cf
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// Azure Resource Graph Query
// Find all LoadBalancers which only have 1 backend pool defined
Resources
| where type =~ 'Microsoft.Network/loadBalancers'
| summarize count() by resourceGroup
| where count_ <= 1
| extend backendAddressPools = properties.backendAddressPools
| mv-expand backendAddressPool = backendAddressPools
| extend backendIPConfigurations = backendAddressPool.properties.backendIPConfigurations
| where array_length(backendIPConfigurations) < 2
| project "lb-2", name

0 comments on commit 0a909cf

Please sign in to comment.