Skip to main content

Retrieving the Data Source

This data source can be retrieved by one of ID or name.
Retrieve by ID
To retrieve by ID, fill in only the id field:
data ... {
    id = "your-ID"
}
Retrieve by Name
To retrieve by name, fill in only the name and parent_id fields:
data ... {
    name      = "your name"
    parent_id = "data-source-parent-id"
}

Schema

Optional

  • id (String) Identifier for the resource, unique for its resource type.
  • name (String) Human readable name for the resource.
  • parent_id (String) Identifier of the parent resource to which the resource belongs.

Read-Only

  • backup (Attributes) (see below for nested schema)
  • bootstrap (Attributes) (see below for nested schema)
  • config (Attributes) (see below for nested schema)
  • created_at (String) : Timestamp indicating when the resource was created. A string representing a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS.SSS±HH:MM
  • description (String) Description of the PostgreSQL cluster.
  • labels (Map of String) : Labels associated with the resource.
  • metadata (Attributes) :

    Inner value description

    Common resource metadata. (see below for nested schema)
  • network_id (String) Network ID in which the cluster is created.
  • resource_version (Number) : Version of the resource for safe concurrent modifications and consistent reads. Positive and monotonically increases on each resource spec change (but not on each change of the resource’s container(s) or status). Service allows zero value or current.
  • status (Attributes) (see below for nested schema)
  • updated_at (String) : Timestamp indicating when the resource was last updated. A string representing a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS.SSS±HH:MM

Nested Schema for backup

Read-Only:
  • backup_window_start (String) Backup window start in “HH:MM:SS” format (UTC Time)
  • retention_policy (String) Retention policy to be used for backups and WALs (i.e. ‘7d’)

Nested Schema for bootstrap

Read-Only:
  • db_name (String) Name of the PostgreSQL database. 1-63 characters long.
  • user_name (String) Name of the bootstrap PostgreSQL user.

Nested Schema for config

Read-Only:
  • pooler_config (Attributes) Configuration of the connection pooler. (see below for nested schema)
  • postgresql_config_16 (Attributes) Configuration parameters for postgres (see below for nested schema)
  • public_access (Boolean) Either make cluster public accessible or accessible only via private VPC.
  • template (Attributes) Resources allocated to PostgreSQL hosts. (see below for nested schema)
  • version (String) : Version of PostgreSQL used in the cluster. Possible values: 16

Nested Schema for config.pooler_config

Read-Only:
  • max_pool_size (Number) Maximum number of connections in the pool for a single user/database pair.
  • pooling_mode (String) : Mode that the connection pooler is working in.

    Supported values

    Possible values:
    • POOLING_MODE_UNSPECIFIED
    • SESSION - Session pooling mode.
    • TRANSACTION - Transaction pooling mode.

Nested Schema for config.postgresql_config_16

Read-Only:
  • autovacuum_analyze_scale_factor (Number)
  • autovacuum_naptime (Number) in seconds.
  • autovacuum_vacuum_cost_delay (Number) in milliseconds.
  • autovacuum_vacuum_cost_limit (Number)
  • autovacuum_vacuum_scale_factor (Number)
  • autovacuum_work_mem (Number) in kilobytes.
  • default_transaction_read_only (Boolean)
  • idle_in_transaction_session_timeout (Number) in milliseconds.
  • max_connections (Number)
  • search_path (String)
  • shared_buffers (Number) in kilobytes.
  • statement_timeout (Number) in milliseconds.

Nested Schema for config.template

Read-Only:

Nested Schema for config.template.disk

Read-Only:
  • size_gibibytes (Number)
  • type (String)

Nested Schema for config.template.hosts

Read-Only:
  • count (Number)

Nested Schema for config.template.resources

Read-Only:
  • platform (String)
  • preset (String)

Nested Schema for metadata

Nested Schema for status

Read-Only:
  • connection_endpoints (Attributes) Connection endpoints of the PostgreSQL cluster. (see below for nested schema)
  • phase (String) : Current phase of the cluster.

    Supported values

    Possible values:
    • PHASE_UNSPECIFIED
    • PHASE_PROVISIONING
    • PHASE_RUNNING
    • PHASE_UPDATING
    • PHASE_DELETING
    • PHASE_DELETED[deprecated]
    • PHASE_PURGING
    • PHASE_STOPPING
    • PHASE_RESUMING
  • preset_details (Attributes) Cluster resource preset details (see below for nested schema)
  • state (String) : State reflects substatus of the phase to define whether it’s healthy or not.

    Supported values

    Possible values:
    • STATE_UNSPECIFIED
    • STATE_IN_PROGRESS
    • STATE_FINISHED
    • STATE_ERROR
    • STATE_DEGRADED
    • STATE_SCHEDULED

Nested Schema for status.connection_endpoints

Read-Only:
  • private_read_only (String) Read only endpoint of the PostgreSQL cluster accessible from the private VPC.
  • private_read_write (String) Read write endpoint of the PostgreSQL cluster accessible from the private VPC.
  • public_read_only (String) Read only endpoint of the PostgreSQL cluster accessible from the internet.
  • public_read_write (String) Read write endpoint of the PostgreSQL cluster accessible from the internet.

Nested Schema for status.preset_details

Read-Only:
  • cpu_count (Number)
  • gpu_count (Number)
  • memory_gibibytes (Number)