> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# nebius_msp_postgresql_v1alpha1_cluster resource

## Schema

### Required

* `bootstrap` (Attributes) (see [below for nested schema](#nestedatt--bootstrap))
* `config` (Attributes) (see [below for nested schema](#nestedatt--config))
* `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](#nestedatt--backup))
* `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](#nestedatt--metadata))
* `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](https://developer.hashicorp.com/terraform/language/resources/ephemeral/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](#nestedatt--sensitive))

### Read-Only

* `created_at` (String) :

  Timestamp indicating when the resource was created.

  A string representing a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/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](#nestedatt--status))
* `updated_at` (String) :

  Timestamp indicating when the resource was last updated.

  A string representing a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ` or `YYYY-MM-DDTHH:MM:SS.SSS±HH:MM`

<a id="nestedatt--bootstrap" />

### 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.

<a id="nestedatt--config" />

### Nested Schema for `config`

Required:

* `template` (Attributes) Resources allocated to PostgreSQL hosts. (see [below for nested schema](#nestedatt--config--template))
* `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](#nestedatt--config--pooler_config))
* `postgresql_config_16` (Attributes) Configuration parameters for postgres (see [below for nested schema](#nestedatt--config--postgresql_config_16))
* `public_access` (Boolean) Either make cluster public accessible or accessible only via private VPC.

<a id="nestedatt--config--template" />

### Nested Schema for `config.template`

Required:

* `disk` (Attributes) (see [below for nested schema](#nestedatt--config--template--disk))
* `hosts` (Attributes) (see [below for nested schema](#nestedatt--config--template--hosts))
* `resources` (Attributes) reduced msp.v1alpha1.resource.TemplateSpec (see [below for nested schema](#nestedatt--config--template--resources))

<a id="nestedatt--config--template--disk" />

### Nested Schema for `config.template.disk`

Required:

* `size_gibibytes` (Number)
* `type` (String)

<a id="nestedatt--config--template--hosts" />

### Nested Schema for `config.template.hosts`

Required:

* `count` (Number)

<a id="nestedatt--config--template--resources" />

### Nested Schema for `config.template.resources`

Required:

* `platform` (String)
* `preset` (String)

<a id="nestedatt--config--pooler_config" />

### 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.

<a id="nestedatt--config--postgresql_config_16" />

### 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.

<a id="nestedatt--backup" />

### 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')

<a id="nestedatt--metadata" />

### Nested Schema for `metadata`

<a id="nestedatt--sensitive" />

### Nested Schema for `sensitive`

Optional:

* `bootstrap` (Attributes) (see [below for nested schema](#nestedatt--sensitive--bootstrap))
* `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.

<a id="nestedatt--sensitive--bootstrap" />

### Nested Schema for `sensitive.bootstrap`

Optional:

* `user_password` (String, Sensitive, [Write-only](https://developer.hashicorp.com/terraform/language/resources/ephemeral#write-only-arguments)) Password of the bootstrap PostgreSQL user.

<a id="nestedatt--status" />

### Nested Schema for `status`

Read-Only:

* `connection_endpoints` (Attributes) Connection endpoints of the PostgreSQL cluster. (see [below for nested schema](#nestedatt--status--connection_endpoints))
* `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](#nestedatt--status--preset_details))
* `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`

<a id="nestedatt--status--connection_endpoints" />

### 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.

<a id="nestedatt--status--preset_details" />

### Nested Schema for `status.preset_details`

Read-Only:

* `cpu_count` (Number)
* `gpu_count` (Number)
* `memory_gibibytes` (Number)
