--- page_title: "ona_team_ai_budget Resource - ona" subcategory: "Billing" description: |- Mode-specific soft Ona AI budget for a team. Team budgets support reporting and alerts but are not enforced at usage time, and total team budgets may exceed the organization grant. Separate credits and byok instances for one team preserve each other. This feature requires an enterprise organization and suitable Billing permissions. --- # ona_team_ai_budget (Resource) Mode-specific soft Ona AI budget for a team. Team budgets support reporting and alerts but are not enforced at usage time, and total team budgets may exceed the organization grant. Separate `credits` and `byok` instances for one team preserve each other. This feature requires an enterprise organization and suitable Billing permissions. The API stores credit and BYOK budgets in one team allocation, while Terraform manages them as separate mode-specific resources. Both resources may therefore have the same computed `id`. Updating or deleting one mode preserves the other mode. Team budgets are soft reporting and alerting budgets, not usage enforcement limits. ## Example Usage ```terraform resource "ona_team_ai_budget" "platform_credits" { team_id = "44444444-4444-4444-8444-444444444444" mode = "credits" credit_budget = 1500 } resource "ona_team_ai_budget" "platform_byok" { team_id = "44444444-4444-4444-8444-444444444444" mode = "byok" cost_budget_microunits = 50000000 cost_budget_currency = "usd" } ``` ## Schema ### Required - `mode` (String) Budget mode: `credits` or `byok`. Changing this value replaces the resource. - `team_id` (String) Team UUID receiving the budget. Changing this value replaces the resource. ### Optional - `cost_budget_currency` (String) Currency for a BYOK team budget: `usd`, `eur`, or `gbp`. - `cost_budget_microunits` (Number) Positive BYOK soft budget in currency microunits for `byok` mode. - `credit_budget` (Number) Positive whole-credit soft budget for `credits` mode. Configure a value from 1 through 9,223,372,036,854. ### Read-Only - `created_at` (String) Shared allocation creation time in RFC 3339 format. - `id` (String) Shared team allocation ID. - `organization_id` (String) Organization ID resolved from the configured provider token. ## Import Import is supported with `organization_id/team_id/mode`. Import `credits` and `byok` separately when both dimensions exist on the shared allocation. The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example: ```shell #!/usr/bin/env sh # Both mode-specific resources may import dimensions of the same shared allocation. terraform import ona_team_ai_budget.platform_credits 11111111-1111-4111-8111-111111111111/44444444-4444-4444-8444-444444444444/credits terraform import ona_team_ai_budget.platform_byok 11111111-1111-4111-8111-111111111111/44444444-4444-4444-8444-444444444444/byok ```