📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

ti configure



Configures a local TiDB Cloud CLI profile. Without flags, this is the only interactive TiDB Cloud CLI command.

Syntax

ti configure [--help] [--non-interactive] [--region-code <string>] [--tidb-cloud-private-key <string>] [--tidb-cloud-public-key <string>] [--version]

Options

  • --help: Display help information.
  • --non-interactive: Avoid prompts. Provide the region code, public key, and private key through the corresponding command options or environment variables. This is useful when running ti in a script or automated environment.
  • --region-code <string>: Default region code, for example aws-us-east-1 or aws-ap-southeast-1.
  • --tidb-cloud-private-key <string>: TiDB Cloud API private key.
  • --tidb-cloud-public-key <string>: TiDB Cloud API public key.
  • --version: Display version information.

For options shared by all commands, see Global options.

Configuration value sources

The following command options and environment variables provide the same configuration values:

Configuration valueCommand optionEnvironment variable
Default region code--region-codeTI_REGION_CODE
TiDB Cloud API public key--tidb-cloud-public-keyTIDB_CLOUD_PUBLIC_KEY
TiDB Cloud API private key--tidb-cloud-private-keyTIDB_CLOUD_PRIVATE_KEY

For each value, an explicitly provided command option takes precedence over its environment variable. With --non-interactive, all three values must resolve from these sources.

Examples

  • Configure ti interactively:

    # Enter the default region code and TiDB Cloud API keys when prompted. ti configure
  • Configure ti for automation:

    # Supply all required values without interactive prompts. TI_REGION_CODE="aws-us-east-1" \ TIDB_CLOUD_PUBLIC_KEY="<public-key>" \ TIDB_CLOUD_PRIVATE_KEY="<private-key>" \ ti configure --profile ci --non-interactive

Was this page helpful?