TiDB User Day 2024のアーカイブ動画を公開中!詳細を見る
PingCAP_HashiCorp_banner

We are proud to announce our partnership with HashiCorp®, the leader in multi-cloud infrastructure automation software. This partnership between two open-source leaders will help developers automate their infrastructure workflows, drive innovation, and more efficiently manage their cloud-native applications.

Deploy and manage your cloud infrastructure more easily

TiDB Cloud is the fully-managed TiDB service that runs on Google Cloud and Amazon Web Services. It allows developers, DevOps, and DBA teams to easily handle complex database operations such as managing infrastructure and deploying clusters, without needing to be a database expert.

The partnership includes the integration with HashiCorp Terraform®, a multi-cloud provisioning platform for efficiently deploying and managing cloud infrastructure. 

This integration lets you use a consistent workflow to provision and manage your entire infrastructure throughout its lifecycle. As part of the partnership, PingCAP has released TiDB Cloud Terraform provider. It provides a simple way to automate resource provisioning and your infrastructure workflow. TiDB Cloud Terraform provider lets you automatically deploy TiDB Cloud resources, such as clusters, backups, restores, and many other cloud services.

“The PingCAP HashiCorp partnership will make it easier for users to streamline their data infrastructure management flow. Deploying TiDB Cloud with HashiCorp Terraform can accelerate the time-to-market process and reduce infrastructure management overhead,” says Ed Huang, PingCAP CTO, and co-founder. “It’s great to partner with another company so committed to open-source technology. We look forward to integrating with more HashiCorp tools such as Vault.”

Get started with TiDB Cloud via Terraform now

Take the steps below to create a TiDB Cloud serverless cluster using the Terraform provider:

  1. Install Terraform CLI.
  2. Create an API Key and export it as environment variables:
    export TIDBCLOUD_PUBLIC_KEY=<your_public_key>
    export TIDBCLOUD_PRIVATE_KEY=<your_private_key>

    Replace <your_public_key> and <your_private_key> with the created key pair.

  3. Create a serverless cluster using the cluster resource.
    1. Create a <main.tf> file as follows:
      terraform {  
      required_providers {
      tidbcloud = {
      source = "tidbcloud/tidbcloud"
      version = "~> 0.1.0"
      }
      }
      required_version = ">= 1.0.0"
      }

      variable "root_password" {
      type = string
      }

      resource "tidbcloud_cluster" "serverless_cluster" {
      project_id = <your_project_id>
      name = "example"
      cluster_type = "DEVELOPER"
      cloud_provider = "AWS"
      region = "us-east-1"
      config = {
      root_password = var.root_password
      }
      }
    2. Replace <your_project_id> with the ID of the project in which you want to create the cluster. You can use the default project or create a new one. <your_root_password> is the default user’s password for this cluster. Other fields are also configurable.
    3. Run terraform init to download TiDB Cloud Terraform provider, and then run terraform apply to apply the cluster creation. You will need to enter the root password.
  4. Go to the TiDB Cloud console or use the terraform show command to check the cluster state.

To learn more about the integration and get started, review the TiDB Cloud Terraform documentation and explore the Terraform TiDB Cloud Provider GitHub repository. 

To learn more about the partnership, see PingCAP Cloud & Technology Partner Program

Try TiDB Cloud Free Now!

Get the power of a cloud-native, distributed SQL database built for real-time
analytics in a fully managed service.

Keep reading:
Building Applications Faster with TiDB and ILLA Builder
Develop Apps Faster with the Integration of Vercel
Use TiDB Cloud as the Database for Your Java Application


Have questions? Let us know how we can help.

Contact Us

TiDB Cloud Dedicated

TiDB Cloudのエンタープライズ版。
専用VPC上に構築された専有DBaaSでAWSとGoogle Cloudで利用可能。

TiDB Cloud Serverless

TiDB Cloudのライト版。
TiDBの機能をフルマネージド環境で使用でき無料かつお客様の裁量で利用開始。