Every addon carries its own persistent volume. Suspension stops the container but leaves the volume intact. Deletion permanently removes both. There is no shared infrastructure, and each addon is isolated to the workspace that provisioned it.
Security Model
Connection strings and credentials are never displayed in the CLI output. When you provision an addon, the platform injects the connection secret directly into your application’s environment as a secret, then sends the full credentials to your email address. This keeps sensitive database URLs, passwords, and access keys out of terminal history, logs, and CI/CD output entirely. If you need to retrieve credentials, check your email. If you need to rotate them, re-runtroq addons apply for the same addon type.
Context and Directory Convention
Like alltroq commands, the addon commands resolve the target application from the troq.toml file in your current working directory. There is no session-level “active app” stored anywhere. Every command reads the file at runtime.
This means:
troq.toml, the CLI will present an interactive fuzzy selector to pick the app. In scripts or CI pipelines, pass --app-id explicitly.
Viewing the Addon Catalog
troq addons catalog lists every addon type available in your workspace. This is the canonical way to see what the platform can provision before running apply.
Listing Addons for an App
troq addons list returns all addons currently attached to an application, their types, runtime status, and whether they are ready to accept connections.
runtime_ready field indicates whether the addon container is running and healthy. The runtime_state field shows the current container state: running, stopped, or error. Addons with status: active and runtime_ready: true are fully operational.
Inspecting an Addon
troq addons show returns the full record for a single addon. When run interactively, the CLI fetches the list of addons and presents a fuzzy selector:
--addon-id directly:
Provisioning an Addon
troq addons apply is the primary command for attaching a managed service to your application. It provisions the runtime container, mounts the persistent volume, registers the connection secret into your app’s secret store, and sends the full credentials to your email.
--addon-type, the CLI presents an interactive selector showing available types from the catalog. Each entry indicates whether you already have an addon of that type attached.
What happens during provisioning:
- The CLI resolves the app from
troq.tomlor the--app-idflag. - The platform creates the addon record in the database and assigns a unique addon code (e.g.
ADD-00000030). - A provisioning job is dispatched to the fleet node hosting your application via the deployer.
- On the node, the platform pulls the addon container image if not already cached, creates a dedicated data volume, configures network isolation, and starts the container.
- Once the container is healthy, the platform writes the connection secret into your app’s secret store under the default key for that addon type (
DATABASE_URL,MYSQL_URL,MONGODB_URL,REDIS_URL,MINIO_URL). - The full credentials, including the connection string, host, port, and any admin credentials, are sent to your registered email address.
- The CLI prints a summary and instructs you to run
troq shipso your application picks up the new secret.
troq ship to trigger a new deployment that picks up the injected secret. The addon is live and accepting connections before the ship completes, but troq ship is required to expose the new secret to your running application process.
Applying Multiple Addons
You can apply multiple addon types in a single invocation:apply for the failing type safely.
Custom Secret Keys
By default, the connection secret is stored under the standard environment variable name for each addon type. To store it under a custom key:Persisting to troq.toml
By default,apply writes the provisioned addon types to troq.toml under an addons key. This allows subsequent apply runs (e.g. in CI) to reproduce the same set of addons without flags. To disable this:
What Happens if the Addon Already Exists
If an addon of the requested type is already attached to the app, the CLI informs you and prompts whether you want to provision an additional one. In non-interactive environments, the duplicate is skipped automatically. Use a separate--secret-key if you need two databases of the same type with distinct environment variable names.
Suspending an Addon
troq addons suspend stops the addon container on the fleet node without removing the data volume. The addon record remains in the database with status suspended. All data on the persistent volume is preserved.
--addon-id, the CLI presents a fuzzy selector listing all active addons for the workspace.
Suspension is appropriate when you need to take a database offline temporarily, for maintenance, cost reduction, or before a planned deletion. Your application will lose connectivity to the addon as soon as suspension completes. Make sure your application handles connection errors gracefully before suspending an addon that is actively in use.
What happens on suspend:
- The platform transitions the addon status from
activetosuspended. - A control event is dispatched to the fleet node via the deployer.
- The node agent stops the addon container via SIGTERM.
- The container exits. The data volume remains mounted and intact.
Resuming an Addon
troq addons resume restarts a suspended addon from its last known state. The data volume is remounted and the container is started from the same image. No re-provisioning is required.
suspended back to active. Your application will regain connectivity automatically once the container is healthy, no secret rotation or troq ship is required unless your app caches the connection at startup.
Deleting an Addon
troq addons delete permanently removes an addon from the platform. The container is stopped, the persistent volume is deleted, and all data stored in it is gone. This is not reversible.
- The platform stops the addon container on the fleet node.
- The Docker volume holding the addon data is removed from the node filesystem.
- The addon record is marked as deleted in the database.
- The connection secret injected into your app’s secret store is revoked.
troq addons list will no longer show the addon. If your application is still running with the now-invalid secret, it will begin receiving connection errors. Run troq ship after deletion to redeploy without the stale secret.
Non-Interactive and Automation Usage
Alltroq addons commands work without prompts when the required identifiers are supplied as flags. This is the expected pattern in CI/CD pipelines and deployment scripts.
--yes before addons to suppress confirmation prompts in destructive operations. Without --yes, deletion will block waiting for terminal input.
Output Formats
Alladdons commands support --output table, --output json, and --output jsonl. Table is the default and is formatted for human reading. JSON and JSONL carry the full response payload and are suitable for scripting and downstream tooling.
Permission Requirements
Read operations (list, show, catalog) require addons.read. Write and lifecycle operations (apply, suspend, resume, delete) require addons.write. You can verify your access with:
troq rbac roles-permissions-list to see what each role grants before requesting a change.
Last Updated: 2026-05-11