{"id":29917683,"url":"https://github.com/diegodev91/azure-cost-dashboard","last_synced_at":"2025-10-04T11:52:41.087Z","repository":{"id":304697674,"uuid":"1019594241","full_name":"diegodev91/azure-cost-dashboard","owner":"diegodev91","description":"Enterprise-grade Azure cost tracking solution using 100% Azure native capabilities. Deploy automated cost monitoring, budgets, alerts, and dashboards across multiple environments with GitHub Actions.","archived":false,"fork":false,"pushed_at":"2025-07-14T20:05:22.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-02T06:19:43.222Z","etag":null,"topics":["azure","bicep","budget","cost-management","dashboard","devops","finops","github-actions","infrastructure","monitoring"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diegodev91.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-14T15:10:44.000Z","updated_at":"2025-07-14T20:05:25.000Z","dependencies_parsed_at":"2025-07-14T21:35:04.300Z","dependency_job_id":"1d59bd93-826c-462a-a3b3-fc240a432468","html_url":"https://github.com/diegodev91/azure-cost-dashboard","commit_stats":null,"previous_names":["diegodev91/azure-cost-dashboard"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/diegodev91/azure-cost-dashboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegodev91%2Fazure-cost-dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegodev91%2Fazure-cost-dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegodev91%2Fazure-cost-dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegodev91%2Fazure-cost-dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diegodev91","download_url":"https://codeload.github.com/diegodev91/azure-cost-dashboard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegodev91%2Fazure-cost-dashboard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278308627,"owners_count":25965654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","bicep","budget","cost-management","dashboard","devops","finops","github-actions","infrastructure","monitoring"],"created_at":"2025-08-02T05:14:16.769Z","updated_at":"2025-10-04T11:52:41.063Z","avatar_url":"https://github.com/diegodev91.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Cost Dashboard\n\n[![Deploy Infrastructure](https://github.com/diegodev91/azure-cost-dashboard/actions/workflows/deploy-infrastructure.yml/badge.svg)](https://github.com/diegodev91/azure-cost-dashboard/actions/workflows/deploy-infrastructure.yml)\n[![Cost Reporting](https://github.com/diegodev91/azure-cost-dashboard/actions/workflows/cost-reporting.yml/badge.svg)](https://github.com/diegodev91/azure-cost-dashboard/actions/workflows/cost-reporting.yml)\n\nAn enterprise-grade Azure cost tracking solution using **100% Azure native capabilities**. Deploy automated cost monitoring, budgets, alerts, and dashboards across multiple environments without any external dependencies.\n\n## 🚀 Quick Deploy\n\n1. **Fork this repository**\n2. **Configure GitHub secrets** (see setup guide below)\n3. **Push to main branch** - deployment starts automatically!\n4. **Access dashboards** in Azure Portal\n\n## 🎯 What Gets Created\n\n### Azure Native Components\n- 🎛️ **Azure Portal Dashboard** - Native cost visualization widgets\n- 📊 **Azure Monitor Workbook** - Interactive cost analysis with KQL queries  \n- 💰 **Cost Management Integration** - Automated budgets, alerts, forecasting\n- 📧 **Email Notifications** - Budget threshold alerts (80%, 100%)\n- 📈 **Log Analytics** - 30-day cost data retention and custom queries\n\n### Automation\n- ⚡ **GitHub Actions** - Automated deployment and reporting\n- 📅 **Scheduled Reports** - Daily, weekly, monthly cost analysis\n- 🐍 **Python Scripts** - Custom report generation and email automation\n- 💻 **PowerShell Scripts** - Windows-based cost analysis tools\n\n## Project Structure\n\n```\ncost-dashboard/\n├── bicep/                     # Infrastructure as Code\n│   ├── main.bicep            # Main deployment template\n│   └── modules/              # Modular Bicep templates\n├── .github/workflows/        # GitHub Actions workflows\n├── scripts/                  # Cost reporting automation\n├── config/                   # Configuration files\n└── docs/                     # Documentation\n```\n\n## Prerequisites\n\n- Azure subscription with Cost Management permissions\n- GitHub repository with Actions enabled\n- Azure CLI or PowerShell Az module\n\n## 🛠️ Setup Instructions\n\n### Step 1: Fork Repository\nFork this repository to your GitHub account.\n\n### Step 2: Create Azure Service Principal\n```bash\n# Create service principal with required permissions\naz ad sp create-for-rbac \\\n  --name \"cost-dashboard-sp\" \\\n  --role \"Contributor\" \\\n  --scopes \"/subscriptions/YOUR_SUBSCRIPTION_ID\" \\\n  --sdk-auth\n\n# Add Cost Management Reader role\naz role assignment create \\\n  --assignee SERVICE_PRINCIPAL_CLIENT_ID \\\n  --role \"Cost Management Reader\" \\\n  --scope \"/subscriptions/YOUR_SUBSCRIPTION_ID\"\n```\n\n### Step 3: Configure GitHub Secrets\nAdd these secrets in your repository: **Settings** → **Secrets and variables** → **Actions**\n\n| Secret Name | Description | Required |\n|-------------|-------------|----------|\n| `AZURE_CLIENT_ID` | Service Principal Application ID | ✅ |\n| `AZURE_TENANT_ID` | Azure AD Tenant ID | ✅ |\n| `AZURE_SUBSCRIPTION_ID` | Target Azure Subscription ID | ✅ |\n| `SMTP_SERVER` | Email server for reports (optional) | ❌ |\n| `SMTP_USERNAME` | Email username (optional) | ❌ |\n| `SMTP_PASSWORD` | Email password (optional) | ❌ |\n\n### Step 4: Configure GitHub Variables  \nAdd these variables in: **Settings** → **Secrets and variables** → **Actions** → **Variables**\n\n| Variable Name | Description | Default | Example |\n|---------------|-------------|---------|---------|\n| `AZURE_LOCATION` | Azure region | `East US` | `West US 2` |\n| `BUDGET_AMOUNT` | Monthly budget (USD) | `1000` | `5000` |\n| `ALERT_EMAILS` | JSON array of emails | `[\"diego.castillo@outlook.com\"]` | `[\"finance@company.com\"]` |\n| `SMTP_ENABLED` | Enable email reports | `false` | `true` |\n| `REPORT_RECIPIENTS` | Email list for reports | | `admin@company.com,finance@company.com` |\n\n### Step 5: Customize Parameters\n1. Copy `bicep/bicep.parameters.example.bicepparam` to `bicep/bicep.parameters.bicepparam`\n2. Update with your values:\n```bicep\nparam environment = 'prod'  // or 'dev', 'staging'\nparam location = 'East US'\nparam budgetAmount = 5000\nparam alertEmails = [\n  'diego.castillo@outlook.com'\n]\n```\n\n### Step 6: Deploy\n```bash\ngit add .\ngit commit -m \"Configure cost dashboard for production\"\ngit push origin main\n```\n\n## 📊 Accessing Your Dashboards\n\n### Azure Portal Dashboard\n1. Go to [Azure Portal](https://portal.azure.com)\n2. Navigate to **Dashboards**\n3. Select **\"dashboard-cost-{environment}\"**\n\n### Cost Management Tools\n1. **Cost Management + Billing** → Comprehensive cost analysis\n2. **Monitor** → **Workbooks** → Interactive cost analysis\n3. **Budgets** → Budget monitoring and alerts\n\n## 🔧 Resource Group Strategies\n\nChoose your approach for tracking costs across projects:\n\n### Option 1: Naming Convention (Recommended)\n```\nrg-{project}-{environment}-{location}\nExamples:\n- rg-webapp-prod-eastus\n- rg-database-dev-westus2\n- rg-analytics-staging-centralus\n```\n\n### Option 2: Tagging Strategy\n```json\n{\n  \"Project\": \"ECommerce\",\n  \"Environment\": \"Production\",\n  \"CostCenter\": \"Engineering\",\n  \"Owner\": \"team@company.com\"\n}\n```\n\n### Option 3: Subscription Separation\n- Separate subscriptions for major projects\n- Deploy cost dashboard in each subscription\n\n## 📈 Features\n\n- ✅ **Multi-environment support** (dev, staging, prod)\n- ✅ **Automated budget alerts** (configurable thresholds)\n- ✅ **Email notifications** with cost summaries\n- ✅ **Resource group cost tracking**\n- ✅ **Service-level cost analysis**\n- ✅ **Daily/weekly/monthly reporting**\n- ✅ **Cost trend forecasting**\n- ✅ **Export capabilities** (CSV, JSON, charts)\n\n## 🛡️ Security \u0026 Compliance\n\n- 🔐 **No sensitive data in repository**\n- 🔐 **GitHub secrets for credentials**\n- 🔐 **Service principal with minimal permissions**\n- 🔐 **Azure native security model**\n- 🔐 **HTTPS for all communications**\n\n## 📚 Documentation\n\n- [Setup Guide](docs/SETUP.md) - Detailed deployment instructions\n- [Architecture](docs/ARCHITECTURE.md) - Technical architecture overview\n- [Azure Native Dashboard](docs/AZURE_NATIVE_DASHBOARD.md) - Dashboard features\n- [Resource Group Strategies](docs/RESOURCE_GROUP_STRATEGIES.md) - Cost tracking approaches\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Test with your Azure environment\n5. Submit a pull request\n\n## 📜 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🆘 Support\n\n- 📖 Check the [documentation](docs/) for detailed guides\n- 🐛 Report issues using GitHub Issues\n- 💬 Discussions in GitHub Discussions\n- 📧 For security issues, email privately\n\n## 🌟 Acknowledgments\n\n- Built with Azure Bicep and native Azure services\n- Powered by GitHub Actions for automation\n- Uses Azure Cost Management APIs for data\n- Designed for enterprise-scale cost monitoring\n\n---\n\n**Ready to deploy?** Follow the setup instructions above and start monitoring your Azure costs in minutes! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegodev91%2Fazure-cost-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiegodev91%2Fazure-cost-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegodev91%2Fazure-cost-dashboard/lists"}