پرش به مطلب اصلی

arvancloud_dbaas_postgresql_standby_instance (Resource)

Manages a PostgreSQL standby. Set replica_of to the primary instance id.

After create, the provider waits until the instance is ACTIVE (up to ~45m, 15s poll). Standbys cannot be updated after create; changing replica_of, availability_zone, or name forces replacement.

Example Usage

resource "arvancloud_dbaas_postgresql_primary_instance" "db" {
name = "app-postgresql"
availability_zone = "ir-thr-ba1"
flavor_ref = "g2-4-2-0"
datastore_version = "17.3"
volume_size = 50
tags = ["tf", "postgresql"]
}

resource "arvancloud_dbaas_postgresql_standby_instance" "standby" {
replica_of = arvancloud_dbaas_postgresql_primary_instance.db.id
name = "app-postgresql-standby"
availability_zone = arvancloud_dbaas_postgresql_primary_instance.db.availability_zone
depends_on = [arvancloud_dbaas_postgresql_primary_instance.db]
}

Schema

Required

  • availability_zone (String) Composite AZ sent as az (e.g. ir-thr-ba1).
  • replica_of (String) id of the primary PostgreSQL instance.

Optional

  • name (String)

Read-Only

  • created_at (String)
  • datastore_engine (String)
  • engine_port (String)
  • flavor_cpu (Number)
  • flavor_disk_gb (Number)
  • flavor_iops (Number)
  • flavor_ram_gb (Number)
  • id (String) Stable instance id (API id). Survives failovers and HA.
  • intrinsic_id (String) Unique id of the currently provisioned node (API intrinsicId).
  • node_type (String) Always STANDBY for this resource (API nodeType).
  • status (String)