terraform/provider/docs/resources/budget.md
Manages a budget object on the LiteLLM proxy. Budgets can be attached to keys, teams, organizations, and end users to enforce spend limits
resource "litellm_budget" "engineering" {
budget_id = "engineering-monthly"
max_budget = 500.0
soft_budget = 400.0
budget_duration = "30d"
tpm_limit = 500000
rpm_limit = 5000
max_parallel_requests = 100
model_max_budget = jsonencode({
"gpt-4o" = {
max_budget = 100.0
budget_duration = "1d"
}
})
}
budget_id (Optional, Forces new resource) - Unique ID for the budget. Generated by the server if not providedmax_budget (Optional) - Requests fail if this budget in USD is exceededsoft_budget (Optional) - Requests do not fail if this is exceeded, but alerts firemax_parallel_requests (Optional) - Maximum concurrent requests allowed for this budgettpm_limit (Optional) - Maximum tokens per minute allowed for this budgetrpm_limit (Optional) - Maximum requests per minute allowed for this budgetbudget_duration (Optional) - Budget reset period, e.g. 1hr, 1d, 28dmodel_max_budget (Optional) - JSON string of per-model budget config, e.g. jsonencode({"gpt-4o" = {max_budget = 10.0}})id - The budget IDbudget_reset_at - Datetime when the budget is resetBudgets can be imported using the budget ID:
terraform import litellm_budget.engineering <budget-id>