Skip to main content
selectel_dbaas_postgresql_logical_replication_slot_v1
Last update:

selectel_dbaas_postgresql_logical_replication_slot_v1

For your information

Эта инструкция — копия документации Selectel Terraform-провайдера в Terraform Registry.

Creates and manages a logical replication slot for Managed Databases using public API v1. Applicable to PostgreSQL and PostgreSQL TimescaleDB datastores. For more information about replication slots in Managed Databases, see the official Selectel documentation for PostgreSQL and PostgreSQL TimescaleDB.

Example usage

resource "selectel_dbaas_postgresql_logical_replication_slot_v1" "slot_1" {
project_id = selectel_vpc_project_v2.project_1.id
region = "ru-3"
datastore_id = selectel_dbaas_postgresql_datastore_v1.datastore_1.id
database_id = selectel_dbaas_postgresql_database_v1.database_1.id
name = "test_slot"
}

Argument Reference

  • project_id - (Required) Unique identifier of the associated project. Changing this creates a new replication slot. Retrieved from the selectel_vpc_project_v2 resource. Learn more about Projects.

  • region - (Required) Pool where the database is located, for example, ru-3. Changing this creates a new replication slot. Learn more about available pools in the Availability matrix.

  • datastore_id - (Required) Unique identifier of the associated datastore. Changing this creates a new replication slot. Retrieved from the selectel_dbaas_postgresql_datastore_v1 resource.

  • database_id - (Required) Unique identifier of the associated database. Changing this creates a new replication slot. Not applicable to a Redis datastore. Retrieved from the selectel_dbaas_postgresql_database_v1 resource.

  • name - (Required) Slot name. Can contain only lowercase letters, numbers, and an underscore. Changing this creates a new replication slot.

Attributes Reference

  • status - Status of the replication slot.

Import

You can import a replication slot:

export OS_DOMAIN_NAME=<account_id>
export OS_USERNAME=<username>
export OS_PASSWORD=<password>
export SEL_PROJECT_ID=<selectel_project_id>
export SEL_REGION=<selectel_pool>
terraform import selectel_dbaas_postgresql_logical_replication_slot_v1.slot_1 <replication_slot_id>

where:

  • <account_id> — Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.

  • <username> — Name of the service user. To get the name, in the Control panel, go to Identity & Access ManagementUser management ⟶ the Service users tab ⟶ copy the name of the required user. Learn more about Service users.

  • <password> — Password of the service user.

  • <selectel_project_id> — Unique identifier of the associated project. To get the ID, in the Control panel, go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about Projects. Learn more about Projects.

  • <selectel_pool> — Pool where the cluster is located, for example, ru-3. To get information about the pool, in the Control panel, go to Cloud PlatformManaged Databases. The pool is in the Pool column.

  • <replication_slot_id> — Unique identifier of the replication slot, for example, b311ce58-2658-46b5-b733-7a0f418703f2. To get the replication slot ID, use Selectel Cloud Management API.