Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update Virtual Network Gateway query and add new query for TrafficManagerProfiles #511

Merged
merged 8 commits into from
Nov 7, 2024
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
// cannot-be-validated-with-arg

// Azure Resource Graph Query
// Find traffic manager profiles that do not have at least two endpoints in different regions
resources
| where type == "microsoft.network/trafficmanagerprofiles"
| extend endpoints = properties.endpoints
| mv-expand endpoint = endpoints
| extend endpointLocation = endpoint.properties.endpointLocation
| summarize
regions = makeset(endpointLocation),
tags = any(tags),
name = any(name)
by id
| extend regionCount = array_length(regions)
| where regionCount <= 1
| project recommendationId = "1ad9d7b7-9692-1441-a8f4-93792efbe97a", name, id, tags, param1 = regions
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
Profiles should have multiple endpoints to ensure availability in case an endpoint fails. It's also advised to distribute these endpoints across different regions for enhanced reliability.
potentialBenefits: Enhances availability across regions
pgVerified: true
automationAvailable: false
automationAvailable: true
tags: null
learnMoreLink:
- name: Reliability recommendations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Azure Resource Graph Query
// 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
| 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
Expand Down
Loading