Beginnerautomation
Cloud Cost Chefs Azure Auto-Tagging Function: Automate Your Tags Like a Pro—No Effort Required
🏷️ No more “who made this?” mysteries — this Azure Function tags new resources the moment they land. Zero detective work, 100% accountability.
⏱️ Prep Time:Reheat leftovers and relax
🧩 Difficulty:Beginner
🔍 What It Does
- Listens for ResourceWriteSuccess events from Event Grid
- Extracts creator info straight from their identity claims
- Auto-applies tags like: CreatedBy, CreatedTime, IP Address (optional, but nerdy cool).
- Works via Az PowerShell with a REST API fallback (just in case Az goes grumpy)
⚙️ Requirements Checklist
- ✅ An Azure Function App (PowerShell 7 + Consumption Plan)
- ✅ A System-assigned Managed Identity with at least Tag Contributor role
- ✅ An Event Grid System Topic + Subscription per Azure region or subscription
📌 Talk Nerdy Tip:
This script turns “resource chaos” into “clean tagging hygiene.” No more budget black holes or ghost resources. Want the script? I’ll serve it hot and ready with YAML sprinkles.
taggingautomationcost-allocationcompliance