This repository has been archived on 2023-12-13. You can view files and clone it, but cannot push or open issues or pull requests.
cloud-resources/azure-budget.tf

24 lines
534 B
Terraform
Raw Normal View History

2022-05-17 19:13:38 +02:00
data "azurerm_subscription" "current-subscription" {}
resource "azurerm_consumption_budget_subscription" "subscription-budget" {
name = "subscription-budget"
subscription_id = data.azurerm_subscription.current-subscription.id
2022-05-17 19:13:38 +02:00
amount = 5
time_grain = "Monthly"
2022-05-17 19:19:01 +02:00
time_period {
start_date = "2022-05-01T00:00:00Z"
}
2022-05-17 19:13:38 +02:00
notification {
enabled = true
2022-05-17 19:13:38 +02:00
threshold = 85.0
operator = "GreaterThan"
threshold_type = "Forecasted"
contact_roles = [
"Owner",
]
}
}