Skip to content

Latest commit

 

History

History
71 lines (54 loc) · 2.14 KB

File metadata and controls

71 lines (54 loc) · 2.14 KB
page_title subcategory description
tidbcloud_backups Data Source - terraform-provider-tidbcloud
backups data source

tidbcloud_backups (Data Source)

backups data source

Example Usage

terraform {
  required_providers {
    tidbcloud = {
      source = "tidbcloud/tidbcloud"
    }
  }
}

provider "tidbcloud" {
  public_key  = "fake_public_key"
  private_key = "fake_private_key"
}

data "tidbcloud_backups" "example" {
  page       = 1
  page_size  = 10
  project_id = "fake_id"
  cluster_id = "fake_id"
}

output "output" {
  value = data.tidbcloud_backups.example
}

Schema

Required

  • cluster_id (String) The ID of your cluster.
  • project_id (String) The ID of the project. You can get the project ID from tidbcloud_projects datasource.

Optional

  • page (Number) Default:1 The number of pages.
  • page_size (Number) Default:10 The size of a pages.

Read-Only

  • id (String) data source ID
  • items (Attributes List) The items of backups (see below for nested schema)
  • total (Number) The total number of backups in the project.

Nested Schema for items

Read-Only:

  • create_timestamp (String) The creation time of the backup in UTC. The time format follows the ISO8601 standard, which is YYYY-MM-DD (year-month-day) + T +HH:MM:SS (hour-minutes-seconds) + Z. For example, 2020-01-01T00:00:00Z.
  • description (String) The description of the backup. It is specified by the user when taking a manual type backup. It helps you add additional information to the backup.
  • id (String) The ID of the backup. It is generated by TiDB Cloud.
  • name (String) The name of the backup.
  • size (String) The bytes of the backup.
  • status (String) Enum: PENDING/RUNNING/FAILED/SUCCESS.The status of backup.
  • type (String) Enum: MANUAL/AUTO.The type of backup. TiDB Cloud only supports manual and auto backup. For more information, see TiDB Cloud Documentation.