Skip to content

Latest commit

 

History

History
73 lines (56 loc) · 2.88 KB

File metadata and controls

73 lines (56 loc) · 2.88 KB
page_title astra_database Resource - terraform-provider-astra
subcategory
description astra_database provides an Astra Serverless Database resource. You can create and delete databases. Note: Classic Tier databases are not supported by the Terraform provider. (see https://docs.datastax.com/en/astra/docs/index.html for more about Astra DB)

astra_database (Resource)

astra_database provides an Astra Serverless Database resource. You can create and delete databases. Note: Classic Tier databases are not supported by the Terraform provider. (see https://docs.datastax.com/en/astra/docs/index.html for more about Astra DB)

Example Usage

resource "astra_database" "example" {
  name           = "name"
  keyspace       = "keyspace"
  cloud_provider = "gcp"
  region        = "us-east1"
  additional_regions = ["us-east4", "us-central1"]
}

Schema

Required

  • cloud_provider (String) The cloud provider to launch the database. (Currently supported: aws, azure, gcp)
  • keyspace (String) Initial keyspace name. For additional keyspaces, use the astra_keyspace resource.
  • name (String) Astra database name.
  • region (String) Primary Cloud region to launch the database. (see https://docs.datastax.com/en/astra/docs/database-regions.html for supported regions)

Optional

  • additional_regions (Set of String) Additional Cloud regions for multi-region Database deployment. (see https://docs.datastax.com/en/astra/docs/database-regions.html for supported regions)
  • deletion_protection (Boolean) Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a terraform destroy or terraform apply command that deletes the instance will fail. Defaults to true.
  • timeouts (Block, Optional) (see below for nested schema)

Read-Only

  • additional_keyspaces (List of String) Additional keyspaces
  • cqlsh_url (String) The cqlsh_url
  • data_endpoint_url (String) The data_endpoint_url
  • datacenters (Map of String) Map of Datacenter IDs. The map key is "cloud_provider.region". Example: "GCP.us-east4".
  • grafana_url (String) The grafana_url
  • graphql_url (String) The graphql_url
  • id (String) The ID of this resource.
  • node_count (Number) The node_count
  • organization_id (String) The org id.
  • owner_id (String) The owner id.
  • replication_factor (Number) The replication_factor
  • status (String) The status
  • total_storage (Number) The total_storage

Nested Schema for timeouts

Optional:

  • create (String)
  • delete (String)
  • read (String)
  • update (String)

Import

Import is supported using the following syntax:

terraform import astra_database.example 48bfc13b-c1a5-48db-b70f-b6ef9709872b