Skip to main content

tenantTeardownInitiate

Permanently wipes a tenant from the whole platform via a workflow.

Calls every service's internal <service>SvcClear mutation (26 services), then finalizes: revokes the tenant's API keys (with their APISIX consumers and Keycloak clients), drops the tenant's Mongo database and its GCIP tenant, and finally deletes the tenant record with its channels and the {tenantId}-config Secret Manager secret. The tenant's media.{tenantId} Elasticsearch index goes with mediaV2SvcClear during the fan-out, not here.

There is no compensation: a partial run cannot be rolled back. Every step is idempotent, so a failed run can be started again — and when a clear fails the tenant record and its secret are deliberately left in place, because they are what that re-run needs. A second teardown of a tenant whose run is still in flight is refused. Runs asynchronously — returns a workflow handle immediately; poll tenantTeardownStatus.

This operation is irreversible and destroys every trace of the tenant. Restricted to the admin roles, the same guard as tenantCreationInitiate.

Errors: TENANT_TEARDOWN_INITIATE_ERROR if the workflow could not be started.

tenantTeardownInitiate(
input: TenantTeardownInput!
): TenantTeardownResult!

Arguments

tenantTeardownInitiate.input ● TenantTeardownInput! non-null input

The tenant to wipe.

Type

TenantTeardownResult object

Handle for an async tenant-teardown workflow. The mutation returns immediately; poll tenantTeardownStatus with the workflowId for progress and the per-service outcome.