Skip to main content

Schema

Required

  • bootstrap (Attributes) (see below for nested schema)
  • config (Attributes) (see below for nested schema)
  • network_id (String) Network ID in which the cluster is created.
  • parent_id (String) Identifier of the parent resource to which the resource belongs.

Optional

  • backup (Attributes) (see below for nested schema)
  • 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)
  • name (String) Human readable name for the resource.
  • sensitive (Attributes, Sensitive) This object mirrors the structure of the resource, providing view on the resource’s write-only fields. It is a preferred way to define such fields as they are not stored in the state file. To use any field in write-only mode, do not set it in the main resource, instead set it in the sensitive object. Setting the field in the main resource will overwrite the field in the sensitive object at merging. (see below for nested schema)

Read-Only

  • 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
  • id (String) Identifier for the resource, unique for its resource type.
  • 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 bootstrap

Required:
  • db_name (String) Name of the PostgreSQL database. 1-63 characters long.
  • user_name (String) Name of the bootstrap PostgreSQL user.
Optional:
  • user_password (String, Sensitive) Password of the bootstrap PostgreSQL user.

Nested Schema for config

Required:
  • template (Attributes) Resources allocated to PostgreSQL hosts. (see below for nested schema)
  • version (String) : Version of PostgreSQL used in the cluster. Possible values: 16
Optional:
  • 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.

Nested Schema for config.template

Required:

Nested Schema for config.template.disk

Required:
  • size_gibibytes (Number)
  • type (String)

Nested Schema for config.template.hosts

Required:
  • count (Number)

Nested Schema for config.template.resources

Required:
  • platform (String)
  • preset (String)

Nested Schema for config.pooler_config

Optional:
  • 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

Optional:
  • 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 backup

Optional:
  • 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 metadata

Nested Schema for sensitive

Optional:
  • bootstrap (Attributes) (see below for nested schema)
  • version (String) The version of the write-only fields combined. You can use a hash here, some number, or a version of the secret from which you pull the value, or you can concatenate all of that together. This field is not sent to the server, but it is stored in the state, so don’t store raw secrets here. Changing this field will trigger an update of the resource even if no other fields are changed. Use of this field is not required, but if you do not use it, changes in write-only fields will not trigger updates of the resource by themselves and therefore might not be reflected.

Nested Schema for sensitive.bootstrap

Optional:
  • user_password (String, Sensitive, Write-only) Password of the bootstrap PostgreSQL user.

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)