Skip to content
SHC Docs

Tenant module

Source: modules/tenant/ (ce module); the tenant-create licence gates live in this repo’s modules/tenant/.

CLIshc tenant
Subcommands5
HTTP endpointssee the route reference
Events emitted
Error codessee the error code reference
Service classesTenantService
Cross-module depsapp, network
modules/tenant/
├── command.go
├── router.go
├── service.go
├── types.go
└── commands/

Routes are listed in the generated route reference; request/response notes live in the API reference.

The tenant module owns tenant CRUD — the top-level multi-tenancy boundary in SHC. A tenant is a logical namespace that owns environments, which own stacks. TenantService handles create, list, get, update, delete; it validates uniqueness and enforces that tenants can only be removed when empty.

The CLI (shc tenant) and HTTP API (/api/method/shc.tenant.*) are both thin wrappers over the service. Quota enforcement per tenant lives in quota; config cascade per tenant lives in config.