Files
coder/docs/admin/users/quotas.md
T
coder[bot] d91aa1bebd docs: replace may with can or might per the Vale spike review (#31878)
Replaces `may` with `can` (ability or permission) or `might`
(possibility), following
`word-choice.md#choose-words-that-have-one-meaning`. The Vale findings
spike review marked every `may` row valid.

- 247 lines in 110 files: 75 became `can` and 162 became `might`. The
rest are small rewordings, such as "may wish" becoming "might want".
- Applied the reviewer notes:
- `.style/content-guidelines.md`: "docs may be written ahead" is now
"you can write docs ahead", which also drops the passive voice.
- `admin/external-auth.md`: now "You can grant access to a subset of
repositories.", so the sentence doesn't end on a preposition.
- Also fixed a typo in `gcp-to-aws.md`: "may needed" is now "might
need".

## Left as-is

- **`admin/setup/configuration-reference.md` (7 lines):** this page is
generated from `codersdk` deployment options (`<!-- DO NOT EDIT |
GENERATED CONTENT -->`), so the fix belongs in the Go option
descriptions, followed by `make gen`.
- **Text that quotes the product:**
- `admin/monitoring/health-check.md:196` matches the derphealth message.
- The heading at `templates/troubleshooting.md:45`, the first "may" on
line 47, and the link on line 67 match the web terminal's "your
workspace may be incomplete" warning and its anchor.
- `admin/integrations/oauth2-provider/troubleshooting.md:269` quotes a
server error.

The changed files have no new findings from other rules.

---
AI-generated by Superblink on behalf of @nickvigilante.

---------

Co-authored-by: coder[bot] <137810501+coder[bot]@users.noreply.github.com>
2026-11-06 17:17:35 -05:00

3.8 KiB

title
title
Quotas

Quotas are a mechanism for controlling spend by associating costs with workspace templates and assigning budgets to users. Users that exceed their budget will be blocked from launching more workspaces until they either delete their other workspaces or get their budget extended.

For example: A template is configured with a cost of 5 credits per day, and the user is granted 15 credits, which can be consumed by both started and stopped workspaces. This budget limits the user to 3 concurrent workspaces.

Quotas are a Premium feature. You grant quota allowances to groups, and Coder calculates each user's budget separately in each organization.

Definitions

  • Credits is the fundamental unit representing cost in the quota system. This integer can be arbitrary, or it can map to your preferred currency.
  • Budget is the per-user, enforced, upper limit to credit spend.
  • Allowance is a grant of credits to the budget.

Establish costs

Templates describe their cost through the daily_cost attribute in resource_metadata. Since costs are associated with resources, an offline workspace might consume less quota than an online workspace.

A common use case is separating costs for a persistent volume and ephemeral compute:

resource "docker_volume" "home_volume" {
  name = "coder-${data.coder_workspace_owner.me.name}-${data.coder_workspace.me.name}-root"
}

resource "coder_metadata" "home_volume" {
    resource_id = docker_volume.home_volume.id
    daily_cost  = 10
}

resource "docker_container" "workspace" {
  count = data.coder_workspace.me.start_count
  image = "codercom/code-server:latest"
  ...
  volumes {
    container_path = "/home/coder/"
    volume_name    = docker_volume.home_volume.name
    read_only      = false
  }
}

resource "coder_metadata" "workspace" {
    count       = data.coder_workspace.me.start_count
    resource_id = docker_container.workspace.id
    daily_cost  = 20
}

When the workspace above is shut down, the docker_container and coder_metadata both get deleted. This reduces the cost from 30 credits to 10 credits.

Resources without a daily_cost value are considered to cost 0. If the cost was removed on the docker_volume above, the template would consume 0 credits when it's offline. This technique is good for incentivizing users to shut down their unused workspaces and freeing up compute in the cluster.

Establish budgets

Each group has a configurable Quota Allowance. A user's budget is calculated as the sum of their allowances.

group-settings

For example:

Group Name Quota Allowance
Frontend 10
Backend 20
Data 30

Username Groups Effective Budget
jill Frontend, Backend 30
jack Backend, Data 50
sam Data 30
alex Frontend 10

By default, groups are assumed to have a default allowance of 0.

Quota Enforcement

Coder enforces Quota on workspace start and stop operations. The workspace build process dynamically calculates costs, so quota violation fails builds as opposed to failing the build-triggering operation. For example, the Workspace Create Form will never get held up by quota enforcement.

build-log

Up next