--- page_title: "ona_user_ai_budget Resource - ona" subcategory: "Billing" description: |- Explicit mode-specific monthly Ona AI budget override for an organization user or service account. Inherited organization defaults are not treated as managed overrides. This feature requires an enterprise organization and suitable Billing permissions. --- # ona_user_ai_budget (Resource) Explicit mode-specific monthly Ona AI budget override for an organization user or service account. Inherited organization defaults are not treated as managed overrides. This feature requires an enterprise organization and suitable Billing permissions. This resource manages a direct override for a user or service account. An inherited organization policy is not imported or stored as an `ona_user_ai_budget` resource. Use separate resources for `credits` and `byok`; set `no_cap = true` without limit or currency fields to exempt the identity from the selected organization default. ## Example Usage ```terraform resource "ona_user_ai_budget" "developer_credits" { user_id = "22222222-2222-4222-8222-222222222222" mode = "credits" monthly_credit_limit = 750 } resource "ona_user_ai_budget" "automation_byok_exemption" { user_id = "33333333-3333-4333-8333-333333333333" mode = "byok" no_cap = true } ``` ## Schema ### Required - `mode` (String) Budget mode: `credits` or `byok`. Changing this value replaces the resource. - `user_id` (String) Organization user or service-account UUID receiving the override. Changing this value replaces the resource. ### Optional - `currency` (String) Currency for a BYOK cost limit: `usd`, `eur`, or `gbp`. - `monthly_cost_limit_microunits` (Number) Monthly BYOK cost limit in currency microunits for a capped `byok` override. Must be non-negative. - `monthly_credit_limit` (Number) Whole-credit monthly limit for a capped `credits` override. Configure a value from 0 through 9,223,372,036,854. - `no_cap` (Boolean) Whether this identity is exempt from the selected organization default. Do not configure limit or currency fields when true. ### Read-Only - `created_at` (String) Policy creation time in RFC 3339 format. - `id` (String) Billing policy ID. - `organization_id` (String) Organization ID resolved from the configured provider token. ## Import Import is supported with `organization_id/user_id/mode`. Only a direct user or service-account override can be imported. The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example: ```shell #!/usr/bin/env sh terraform import ona_user_ai_budget.developer_credits 11111111-1111-4111-8111-111111111111/22222222-2222-4222-8222-222222222222/credits terraform import ona_user_ai_budget.automation_byok_exemption 11111111-1111-4111-8111-111111111111/33333333-3333-4333-8333-333333333333/byok ```