Add Azure Advisor RecommendationTypes open data
Overview
This PR adds a new open data file for Azure Advisor recommendation types to help organize and provide additional context for Azure Advisor recommendations in FinOps reports and dashboards.
Problem
Azure Advisor doesn't expose detailed metadata about the different recommendation types available. When building FinOps reports and dashboards, users need contextual information like recommendation categories, impact levels, service names, and resource types to properly organize and describe recommendations.
Solution
Added RecommendationTypes.csv as a new open data file that includes metadata for Azure Advisor recommendation types:
- RecommendationTypeId - Unique GUID identifier for each recommendation type
- Category - Cost, HighAvailability, OperationalExcellence, Performance, or Security
- Impact - High, Medium, or Low
- ServiceName - Azure service the recommendation applies to
- ResourceType - Azure resource type (lowercase)
- DisplayName - Human-readable description of the recommendation
- LearnMoreLink - URL to documentation for more information
Sample data:
| RecommendationTypeId | Category | Impact | ServiceName | ResourceType | DisplayName |
|---|---|---|---|---|---|
| a06456ed-afb7-4d16-86fd-0054e25268ed | Performance | Medium | Virtual Machines | microsoft.compute/virtualmachines | Enable Accelerated Networking to improve network performance and latency |
| a205074f-8049-48b3-903f-556f5e530ae3 | Cost | High | ReservedInstances | microsoft.subscriptions/subscriptions | Buy reserved instance |
PowerShell Integration
Added Get-FinOpsRecommendationType command to query recommendation metadata with filtering capabilities:
# Get all recommendation types
Get-FinOpsRecommendationType
# Filter by category
Get-FinOpsRecommendationType -Category Cost
# Filter by impact and category
Get-FinOpsRecommendationType -Impact High -Category Cost
# Filter by resource type
Get-FinOpsRecommendationType -ResourceType "microsoft.compute/virtualmachines"
Also includes Get-AdvisorRecommendationTypes.ps1 script to fetch recommendation metadata from the Azure Advisor Recommendation Metadata API for future updates.
Changes
-
Added
src/open-data/RecommendationTypes.csvwith sample recommendation metadata -
Added
src/scripts/Get-AdvisorRecommendationTypes.ps1to fetch data from Azure Advisor API -
Added
Get-FinOpsRecommendationTypePowerShell command with filtering support - Added comprehensive unit tests (7 tests, all passing)
- Updated documentation including open-data.md, command reference, and TOC
- Updated Build-OpenData.ps1 to support RecommendationTypes dataset
- Updated changelog for v13
Testing
All unit tests pass:
- ✅ Private function returns correct row count
- ✅ Public function returns all recommendations by default
- ✅ Category filtering works correctly
- ✅ Impact filtering works correctly
- ✅ ServiceName wildcard filtering works
- ✅ ResourceType wildcard filtering works
- ✅ Specific recommendation lookup by ID works
Manual verification confirms:
- Total recommendations: 6
- Cost recommendations: 3
- High impact recommendations: 2
- All filters working as expected
Data Sources
The recommendation metadata is sourced from:
- Azure Advisor Recommendation Metadata API - Provides recommendation type IDs and display names
- MicrosoftDocs/SelfHelpContent repo (private, FTE-only) - Provides additional metadata like category, impact, service name, and learn more links
Follow-up Work
The CSV currently contains sample data. Future updates can:
- Run
Get-AdvisorRecommendationTypes.ps1to fetch the latest metadata from the API - Merge additional columns from the SelfHelpContent repository if available
- Expand the dataset as new recommendation types are added to Azure Advisor
Fixes #[issue-number]
Original prompt
This section details on the original issue you should resolve
<issue_title>[Open data] Azure Advisor recommendation types</issue_title> <issue_description>### Are you submitting your tool or someone else's?
I'm submitting a tool that I own.
Tool ownership responsibilities (only applicable to tool owners)
- [x] I acknowledge the responsibilities of a technical lead and agree to serve in this role for the proposed tool upon its approval.
Tool name
RecommendationTypes.csv
Description
Azure Advisor doesn't expose details about the different recommendations that are available. We should include a new open data file that includes the recommendation type details to describe each recommendation made available in Azure Advisor.
Use case
Organize and provide additional context for Azure Advisor recommendations.
Services used
None
Dependencies
This information can be parsed out of Microsoft Learn docs in GitHub via a PowerShell script. There are no runtime dependencies.</issue_description>
<agent_instructions>Triage the issue, research using mslearn, provide proposed solutions along with links/citations to authorative sources.</agent_instructions>
Comments on the Issue (you are @copilot in this section)
Fixes microsoft/finops-toolkit#1255
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.