pruneops_budget (Resource)¶
A monthly spend ceiling for the organization or one allocation group, evaluated daily against the billed cost; alerts at each threshold and, optionally, when the month's forecast exceeds it.
Example Usage¶
# The whole organization's billed cost.
resource "pruneops_budget" "organization" {
name = "Whole organization"
amount = 5000
}
# One allocation group's share, alerting at 80% and 100% only.
resource "pruneops_budget" "platform" {
name = "Platform team"
amount = 1200
scope = "allocation_group"
group_id = pruneops_allocation_group.platform.id
thresholds = [80, 100]
}
Schema¶
Required¶
amount(Number) Monthly ceiling, USD.name(String) Display name.
Optional¶
enabled(Boolean) Whether the budget is evaluated and alerts.forecast_enabled(Boolean) Also alert when the month's forecast exceeds the amount.group_id(String) The pruneops_allocation_group id, with scope = allocation_group.scope(String) What the amount caps: organization (the whole billed cost) or allocation_group (group_id's share).thresholds(Set of Number) Alert at these percentages of amount (1-999). Default: 50, 80, 90, 100.
Read-Only¶
id(String) Budget id, generated by PruneOps.
Import¶
Import is supported using the following syntax:
The terraform import command can be used, for example:
terraform import pruneops_budget.platform 24f5ca30