| page_title | duploai_admin_quota_mapping Resource - duploai |
|---|---|
| subcategory | |
| description | Manages a DuploCloud AI Helpdesk quota mapping — binds a quota definition to a scope (platform-wide or specific workspaces) and a dimension (workspace, user, or ticket). |
Manages a DuploCloud AI Helpdesk quota mapping — binds a quota definition to a scope (platform-wide or specific workspaces) and a dimension (workspace, user, or ticket).
# A quota definition to bind.
resource "duploai_admin_quota_definition" "monthly" {
name = "monthly-budget"
type = "Monthly"
limit_usd = 2000
}
# Platform-wide cap (Platform + All, no target_ids).
resource "duploai_admin_quota_mapping" "platform_all" {
name = "platform-cap"
quota_reference_id = duploai_admin_quota_definition.monthly.id
scope = "Platform"
type = "All"
}
# Per-workspace cap (Workspace + Workspace, target_ids required).
resource "duploai_admin_quota_mapping" "workspace_cap" {
name = "workspace-cap"
quota_reference_id = duploai_admin_quota_definition.monthly.id
scope = "Workspace"
type = "Workspace"
target_ids = ["<workspace-id>"]
}name(String) Name of the quota mapping. Immutable — changing it forces replacement.quota_reference_id(String) ID of the quota definition this mapping binds. Must reference an existing quota definition.
description(String) Human-readable description of the quota mapping.is_active(Boolean) Whether the quota mapping is active. Defaults to active when omitted.metadata(Map of String) Free-form key/value metadata.scope(String) Scope the quota applies at: 'Platform' (organisation-wide) or 'Workspace' (specific workspaces). Defaults to 'Platform'.target_ids(List of String) Workspace IDs this mapping applies to. Required (non-empty) for 'Workspace' scope; must be omitted for 'Platform' scope.type(String) Dimension the quota targets. Valid scope/type combinations: Workspace scope with Workspace/User/Ticket; Platform scope with All/Workspace/User. Defaults to 'Workspace'.
created_at(String) Timestamp when the quota mapping was created (RFC 3339).created_by(String) Identifier of the user who created the quota mapping.id(String) Composite resource identifier (workspace_id/id).updated_at(String) Timestamp when the quota mapping was last updated (RFC 3339).updated_by(String) Identifier of the user who last updated the quota mapping.version(Number) Version counter, incremented on each update.
Import is supported using the following syntax:
The terraform import command can be used, for example:
# Import an existing quota mapping.
# - QUOTA_MAPPING_ID is the unique identifier of the quota mapping (e.g. 6a2258e94703bc957a1b824e)
terraform import duploai_admin_quota_mapping.mymapping QUOTA_MAPPING_ID
# Example:
# terraform import duploai_admin_quota_mapping.mymapping 6a2258e94703bc957a1b824e