tb deployment

Deploys your project to the Tinybird platform. Run using --cloud to deploy to Tinybird Cloud.

Global options apply to this command. See Global options.

The following subcommands are available:

SubcommandDescription
create [OPTIONS]Validates and deploys the project in Tinybird.
lsLists all the deployments of your project.
promotePromotes last deploy to ready and remove old one. Accepts the --wait / --no-wait option.
discardDiscards the last deployment. Accepts the --wait / --no-wait option.

tb deployment create

Validates and deploys the project in Tinybird. Run using --cloud to deploy to Tinybird Cloud. When deploying to Tinybird Cloud, the command shows the URL of the deployment.

OptionDescription
--wait / --no-waitWaits for the deployment to finish. Defaults to not waiting.
--auto / --no-autoAutomatically promotes the deployment. Only works if --wait is used.
--check / --no-checkValidates the deployment before creating it. Disabled by default.
--allow-destructive-operations / --no-allow-destructive-operationsAllows destructive operations, like removing data sources, dropping historical data from tables, and so on. Disabled by default.
--template TEXTDeploy from a template name or URL. If a URL is provided, it should point to a valid Tinybird project template.

Removing data sources is an irreversible operation. Be careful when using the --allow-destructive-operations flag.

The --check flag validates external connections to S3, Kafka, GCS, and databases referenced via table functions. For local success, set connection secrets with tb secret set and use tb local start --use-aws-creds for S3 connections.

tb deployment discard

Discards the current staging deployment. Use this command to cancel an unfinished deployment. The previous live deployment remains active.

When you run tb deployment discard, the following happens:

  1. The current staging deployment is cancelled.
  2. The deployment resources associated with the staging deployment are removed.
  3. The previous live deployment remains active.
OptionDescription
--wait / --no-waitWaits for the discard operation to finish. Defaults to not waiting.

For example, if a deployment is taking a long time due to backfills, you can discard it:

tb deployment discard --wait

After discarding, the staging deployment and its resources are removed. Your project continues running on the previous live deployment.

Environment support

EnvironmentSupportedDescription
--local✓ Yes (default)Manages deployments locally.
--cloud✓ YesManages deployments in Tinybird Cloud.
--branch=BRANCH_NAME✓ YesManages deployments in a branch.
Updated