Beginnerautomation

CloudCostChefs Monthly RG Cost Report Generator

A PowerShell recipe that auto-whips up a playful, chef-worthy HTML cost report for every Resource Group in your Azure subscription—no portal gymnastics needed.

⏱️ Prep Time:Hard-boiled eggs done
🧩 Difficulty:Beginner

🔍 What It Does

  • 📆 Automatically calculates “last month” date range so you never mis-slice time periods
  • 🔍 Queries Azure Cost Management API and groups costs by Resource Group—no missing crumbs
  • 📋 Includes every RG (zero-cost ones too) so you get a full-course view of your spending
  • 🎨 Outputs a CloudCostChefs-styled HTML file with colorful summary and detailed tables
  • 🖥️ Prints a concise console summary while saving the HTML report and launching it in your browser

⚙️ Requirements Checklist

  • ✅ Az PowerShell module (`Az.Accounts`, optionally `Az.CostManagement`)
  • ✅ `Connect-AzAccount` or a managed identity for authentication
  • ✅ Reader + Cost Management permissions on target subscription
  • ✅ PowerShell 5.x or PowerShell Core (Windows/macOS/Linux)
  • ✅ Internet access to call Azure Cost Management REST API
  • ✅ Write permissions to folder where the HTML report will be saved

📌 Talk Nerdy Tip:

Treat this script like a monthly sous-chef—schedule it on the 6th of each month and let it serve up fresh cost insights without you breaking a sweat.

reportingcost-managementautomationfinopspowershell