Azure Budget Create or Update
azure_budget_createCreate or update Azure cost budgets with automated alerts at 80% actual, 100% actual, and forecasted spend to prevent budget overruns and support WAF cost optimization.
Instructions
Creates or updates a cost budget with WAF-recommended alert thresholds. Default notifications: 80% actual, 100% actual, 100% forecasted — first line of defense against overruns. WAF Cost Optimization: always set both actual and forecasted alerts on every workload budget. CAF: align timeGrain with billing cycles; include Owner/Contributor in contactRoles for governance. If a budget with the same name already exists at the scope it will be updated in-place.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Unique budget name within scope (e.g., 'monthly-sub-budget', 'prod-rg-budget'). | |
| scope | Yes | Azure scope: /subscriptions/{id}, /subscriptions/{id}/resourceGroups/{name}, sub:{id}, rg:{name}, mg:{managementGroupId}. CAF: set budgets at subscription level per landing zone, and at resource group level for workloads. | |
| amount | Yes | Budget amount in the subscription default currency. | |
| endDate | No | Budget end date (YYYY-MM-DD). Defaults to 10 years from start. | |
| startDate | Yes | Budget start date (YYYY-MM-DD). For Monthly grain must be the first day of a month. | |
| timeGrain | No | Budget reset period. Monthly aligns with calendar month. BillingMonth aligns with the Azure billing cycle. | Monthly |
| contactRoles | No | Azure RBAC roles to notify. CAF: Owner and Contributor ensure landing zone owners receive budget alerts without needing explicit email addresses. | |
| contactEmails | No | Email addresses to notify when alert thresholds are reached. | |
| notifyAt80Percent | No | WAF recommended: alert at 80% actual spend (early warning). | |
| notifyAt100Percent | No | WAF recommended: alert at 100% actual spend (budget reached). | |
| notifyForecastAt100Percent | No | WAF recommended: alert when forecast predicts 100% spend before month-end. Proactive warning before the budget is actually exceeded. |