frostmoln_postgres_read_replica (Resource)
Manages a read replica of a managed PostgreSQL instance. Read replicas are immutable after creation.
Example Usage
terraform
resource "frostmoln_postgres_read_replica" "reader" {
instance_id = frostmoln_postgres_instance.main.id
name = "postgres-reader-1"
# Optional — omit to inherit the primary's flavor.
flavor_id = "db.gp1.small"
}
output "postgres_reader_endpoint" {
value = "${frostmoln_postgres_read_replica.reader.private_ip}:${frostmoln_postgres_read_replica.reader.port}"
}Schema
Required
instance_id(String) The ID of the primary PostgreSQL instance to replicate.name(String) The name of the read replica.
Optional
flavor_id(String) Flavor ID sizing the replica (e.g. db.gp1.small). Optional; when omitted the replica inherits the primary's flavor, which is returned as the computed value. Immutable — changing it replaces the replica.
Read-Only
id(String) The unique identifier of the read replica.port(Number) The port number the read replica is listening on.private_ip(String) The private IP address of the read replica.replication_lag_bytes(Number) The replication lag in bytes between primary and replica.status(String) The current status of the read replica.