Skip to the content.

Quotas

Module: services/quotas · NEBIUS_MOCKER_SERVICES=quotas Tier: T2 with live usage and enforcement · Endpoint: quota-dispatcher.billing-cpl.api.nebius.cloud

Implementation status

Piece Status
nebius.quotas.v1.QuotaAllowanceService: List (paged), Get, GetByName, Create (upsert), Update (reset mask, resource_version, spec.region immutable), Delete (resets to the default) ✅ T2
Live status: usage, usage_percentage, usage_state, unit, service, service_description, description, state ✅
Enforcement: creates and resizes that would exceed a project’s or its tenant’s allowance fail with RESOURCE_EXHAUSTED + QuotaFailure ✅ (areas below)
Only admins change quotas (editors and viewers read them) ✅
Default limits per quota, overridable with NEBIUS_MOCKER_QUOTAS_LIMITS ✅
nebius_quotas_v1_quota_allowance resource and data source (by ID and by_name_in_region) with the official Terraform provider ✅ e2e: test/terraform/quotas
CLI: nebius quotas quota-allowance list / get-by-name / get / create / update / delete ✅ e2e: test/cli/quotas

Verified against: nebius/api@4522189, terraform-provider-nebius v0.6.91, gosdk v0.2.100, nebius CLI 0.12.312.

Tests: catalog and config unit tests (pkg/quota, pkg/config), domain tests with fakes including a 50-goroutine race on one limit (services/quotas/domain), DAL tests on the memory store, gosdk contract tests for every RPC, authz per role, enforcement and release, parallel creates and one create per wired area (test/contract/quotas_*), Terraform CRUD plus lowered allowances that refuse a network and a Managed PostgreSQL cluster (make e2e), and the CLI flows from the docs (make e2e).

Overview

A QuotaAllowance (UNNAMED; metadata.name is the quota name, parent a tenant or project) holds a limit (spec.limit) for one region (spec.region). Every tenant and project has one allowance per catalog quota: a project in its own region, a tenant in every emulated region (NEBIUS_MOCKER_REGIONS).

Resource kind Message NID prefix Parent States
Quota allowance QuotaAllowance quotaallowance tenant / project STATE_ACTIVE (the others are never reported)

Emulation design

Catalog

Names are the identifiers Nebius uses in metadata.name. The Nebius docs list quotas by display name only (for example “Regular VMs”), plus the example compute.disk.size.network-ssd. The other names come from Nebius’s own tooling (github.com/nebius/nebius-physical-ai), except those marked inferred, which follow the same pattern. The Managed PostgreSQL and MLflow docs list four quotas each by display name only (“Clusters”, “Total vCPUs across clusters”, “Total RAM across clusters”, “Network SSD disks total size across clusters”; defaults 10, 80, 320 GiB, 2 TiB); their names are inferred from the API packages (nebius.msp.postgresql, nebius.msp.mlflow). Defaults are far above the documented default tier (2 VMs, 8 GPUs, …), so local work is unlimited until you lower an allowance: counts 1000, compute.instance.non-gpu.vcpu 100000, GPUs 4096, sizes 1 PiB. Override them with NEBIUS_MOCKER_QUOTAS_LIMITS="compute.instance.count=2,compute.disk.size.network-ssd=4Ti" (Ki…Pi suffixes).

Area Quota Unit Charged by
compute compute.instance.count count regular instances, including mk8s nodes
compute compute.instance.preemptible.count count preemptible instances
compute compute.instance.non-gpu.vcpu count vCPUs of non-GPU instances
compute compute.instance.gpu.<family> (b200, b300, h100, h200, l40s, rtx6000; gb200, gb300 inferred; any other platform family too) count GPUs of regular GPU instances without a reservation (gpu-h100-sxm → h100)
compute compute.gpucluster.count count GPU clusters
compute compute.disk.count, compute.disk.size.<type> (network-ssd, network-ssd-non-replicated, network-ssd-io-m3, network-hdd) count, byte disks, including managed boot disks; resizes
compute compute.disk.snapshot.count, compute.disk.snapshot.size count, byte disk snapshots
compute compute.filesystem.count, compute.filesystem.size.<type> (network-ssd; network-hdd, weka, vast inferred) count, byte shared filesystems; resizes
vpc vpc.network.count, vpc.subnet.count, vpc.pool.count, vpc.routetable.count, vpc.route.count count user-created resources (see vpc.md for defaults)
vpc vpc.allocation.count, vpc.ipv4-address.public.count count allocations, including the ones NICs create; public IPv4 ones
vpc vpc.securitygroup.count, vpc.securityrule.count (inferred) count security groups and rules
dns dns.zone.count count zones
storage storage.bucket.count, storage.transfer.count count buckets (all types), transfers (v1 and v1alpha1)
mk8s mk8s.cluster.count count clusters; node groups are checked against the compute quotas of their nodes
registry registry.count count registries
mysterybox mysterybox.secret.count count secrets, including ones scheduled for deletion (as in Nebius)
kms kms.symmetrickey.count, kms.asymmetrickey.count (inferred) count keys, including ones scheduled for deletion (as in Nebius)
msp-postgresql msp.postgresql.cluster.count, msp.postgresql.vcpu (inferred) count clusters (Create and Restore), whatever their state, stopped included; hosts × preset vCPUs, with the growth of an Update
msp-postgresql msp.postgresql.memory, msp.postgresql.disk.size (inferred) byte hosts × preset RAM; hosts × disk.size_gibibytes
msp-mlflow msp.mlflow.cluster.count, msp.mlflow.vcpu (inferred) count clusters, stopped included; the vCPUs of their size
msp-mlflow msp.mlflow.memory (inferred) byte the RAM of their size

Terraform

Kind Terraform type Service RPCs called Tier
Resource nebius_quotas_v1_quota_allowance nebius.quotas.v1.QuotaAllowanceService Get, GetByName, Create, Update, Delete + OperationService.Get T2
Data source nebius_quotas_v1_quota_allowance nebius.quotas.v1.QuotaAllowanceService Get, GetByName T2

terraform destroy resets the limit to the default. Changing region (or parent_id) replaces the resource, which, since Create is an upsert, keeps the same allowance ID.

Not yet

API surface

nebius.quotas.v1.QuotaAllowanceService

Endpoint: quota-dispatcher.billing-cpl.api.nebius.cloud:443 · Proto: nebius/quotas/v1/quota_allowance_service.proto · used by Terraform

RPC Request Response TF
List ListQuotaAllowancesRequest ListQuotaAllowancesResponse  
Get GetQuotaAllowanceRequest QuotaAllowance ✅
GetByName GetByNameRequest QuotaAllowance ✅
Create CreateQuotaAllowanceRequest common.v1.Operation ✅
Update UpdateQuotaAllowanceRequest common.v1.Operation ✅
Delete DeleteQuotaAllowanceRequest common.v1.Operation ✅