Terraform module to create consumption budget with alerting in Azure.
Module has following features:
- Create consumption budget (in local currency).
- Create alert rule on budget consumption threshold with email notification.
- Create alert with email notification when budget consumption anomaly is detected.
Refer to examples for usage of module.
Name | Version |
---|---|
terraform | >= 1.8.0, < 2.0.0 |
azurerm | >= 3.0.0, < 5.0.0 |
Name | Type |
---|---|
azurerm_consumption_budget_subscription.sub_budget_consumption | resource |
azurerm_cost_anomaly_alert.sub_cost_anomaly_alert | resource |
azurerm_subscription.current | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
app_short_name | Name of app short, used for rg | string |
n/a | yes |
consumption_budget_amount | The amount of money to be consumed | number |
n/a | yes |
environment | The runtime environment targeted. Development, test, qa, production etc | string |
n/a | yes |
subscription | The subscription | string |
n/a | yes |
consumption_budget_notification_cfg | The notification blocks | map(object({ |
{ |
no |
consumption_budget_time_grain | The time grain for the consumption budget | string |
"Monthly" |
no |
cost_anomaly_alert_email_receivers | The email addresses to receive cost anomaly alerts | list(string) |
[] |
no |
Name | Description |
---|---|
consumption_budget_id | value of the consumption budget id |
cost_anomaly_alert_id | value of the cost anomaly alert id |
No modules.