arvancloud_dbaas_postgresql_primary_instance (Resource)
Manages a primary PostgreSQL database instance on Arvancloud DBaaS.
After create and after resize, the provider waits until the instance is ACTIVE and hasFirstFullBackup is true (up to ~45 minutes each). Changing flavor_ref or volume_size resizes the instance. Changing tags applies updates in place. Most other arguments force replacement when changed.
Example Usage
resource "arvancloud_dbaas_postgresql_primary_instance" "example" {
name = "tf-postgresql-primary"
availability_zone = "ir-thr-ba1"
flavor_ref = "g2-4-2-0"
datastore_version = "17.3"
volume_size = 50
tags = ["tf", "postgresql"]
}
Schema
Required
availability_zone(String) Composite AZ sent asaz(e.g.ir-thr-ba1, fromarvancloud_dbaas_datacentersavailability_zone).datastore_version(String) PostgreSQL engine version (e.g.17.3).flavor_ref(String) Flavor reference (e.g.g2-4-2-0). Updates call the resize API when this value changes.name(String) Cluster/instance name in DBaaS.volume_size(Number) Disk size in GB for the primary volume. Updates call the resize API when this value changes.
Optional
tags(List of String) Optional string tags attached to the instance. Changes update in place viaPATCH /instances/{id}/tags(empty list clears tags).
Read-Only
created_at(String) Creation timestamp from the API (createDate).datastore_engine(String) Alwayspostgresqlfor this resource (APIdatastoreType).engine_port(String) Database engine port.flavor_cpu(Number) vCPU count from the provisioned flavor.flavor_disk_gb(Number) Disk size in GB from the flavor object returned by the API.flavor_iops(Number) IOPS from the provisioned flavor.flavor_ram_gb(Number) RAM in GB from the provisioned flavor.id(String) Stable instance id (APIid). Survives failovers and HA; used inGET/DELETEpaths.intrinsic_id(String) Unique id of the currently provisioned node (APIintrinsicId). Changes after failover.node_type(String) AlwaysPRIMARYfor this resource.status(String) Lifecycle status from the API (e.g.BUILD,ACTIVE).