Resource

dcloud_db_read_replica

A reader of a cluster database (topology = "cluster"): one more machine of the cluster's class, streaming from the leader and serving on the reader endpoint once it has caught up. Never promoted. At most 5 per cluster.

Example Usage

resource "dcloud_db_instance" "main" {
  identifier            = "main"
  instance_class        = "performance-2"
  engine_version        = "17"
  allocated_storage_gib = 20
  topology              = "cluster"
}

resource "dcloud_db_read_replica" "reporting" {
  db_instance_id = dcloud_db_instance.main.id
}

Schema

Required

  • db_instance_id (String) The id of the parent resource ({id} in the path). Changing it replaces the resource.

Read-Only

  • id (String) The resource's id.
  • name (String) The node's name.
  • private_ip (String) The node's address in the VPC.
  • role (String) replica.
  • status (String) provisioning, bootstrapping, running, stopped or failed.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

terraform import dcloud_db_read_replica.reporting <db-instance-id>/<node-id>

Generated from the provider's schema.