Skip to content

Latest commit

 

History

History
90 lines (62 loc) · 2.6 KB

File metadata and controls

90 lines (62 loc) · 2.6 KB
page_title cozystack_postgres Data Source - cozystack
subcategory
description Read an existing Cozystack PostgreSQL instance by name and namespace.

cozystack_postgres (Data Source)

Read an existing Cozystack PostgreSQL instance by name and namespace.

Example Usage

data "cozystack_postgres" "app" {
  name      = "app"
  namespace = "tenant-root"
}

Schema

Required

  • name (String) Postgres instance name.
  • namespace (String) Tenant namespace.

Read-Only

  • chart_version (String) Deployed chart version.
  • databases (Attributes Map) Databases keyed by name. (see below for nested schema)
  • endpoints (Attributes) Connection endpoints. (see below for nested schema)
  • external (Boolean) Whether external access is enabled.
  • id (String) Synthetic identifier namespace/name.
  • ready (Boolean) Whether the application's Ready condition is true.
  • replicas (Number) Number of replicas.
  • resources (Attributes) Explicit CPU and memory per replica, when set. (see below for nested schema)
  • resources_preset (String) Sizing preset.
  • size (String) Persistent volume size.
  • storage_class (String) StorageClass used to store the data.
  • uid (String) Server-assigned object UID (metadata.uid).
  • users (Attributes Map) PostgreSQL users keyed by user name. (see below for nested schema)
  • version (String) PostgreSQL major version.

Nested Schema for databases

Read-Only:

  • extensions (List of String) Enabled extensions.
  • roles (Attributes) User roles for this database. (see below for nested schema)

Nested Schema for databases.roles

Read-Only:

  • admin (List of String) Admin users.
  • readonly (List of String) Read-only users.

Nested Schema for endpoints

Read-Only:

  • host (String) Primary (read-write) service host.
  • port (Number) PostgreSQL port.
  • read_host (String) Replica (read-only) service host.

Nested Schema for resources

Read-Only:

  • cpu (String) CPU available to each replica.
  • memory (String) Memory available to each replica.

Nested Schema for users

Read-Only:

  • password (String, Sensitive) User password.
  • replication (Boolean) Whether the user has replication privileges.