Yandex Cloud
Поиск
Связаться с намиПодключиться
  • Истории успеха
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Доступны в регионе
    • Инфраструктура и сеть
    • Платформа данных
    • Контейнеры
    • Инструменты разработчика
    • Бессерверные вычисления
    • Безопасность
    • Мониторинг и управление ресурсами
    • ИИ для бизнеса
    • Бизнес-инструменты
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Партнёрская программа
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Тарифы Yandex Cloud
    • Промоакции и free tier
    • Правила тарификации
  • Истории успеха
  • Документация
  • Блог
Проект Яндекса
© 2025 ТОО «Облачные Сервисы Казахстан»
Terraform в Yandex Cloud
  • Начало работы
  • Библиотека решений
    • Обзор
    • История изменений (англ.)
          • ydb_database_dedicated
          • ydb_database_iam_binding
          • ydb_database_serverless
          • ydb_table
          • ydb_table_changefeed
          • ydb_table_index
          • ydb_topic

В этой статье:

  • Example Usage
  • Schema
  • Required
  • Optional
  • Read-Only
  • Nested Schema for consumer
  • Nested Schema for timeouts
  • Import
  1. Справочник Terraform
  2. Ресурсы (англ.)
  3. Managed Service for YDB
  4. Resources
  5. ydb_table_changefeed

yandex_ydb_table_changefeed (Resource)

Статья создана
Yandex Cloud
Обновлена 7 августа 2025 г.
  • Example Usage
  • Schema
    • Required
    • Optional
    • Read-Only
    • Nested Schema for consumer
    • Nested Schema for timeouts
  • Import

Yandex Database table changefeed, or Change Data Capture (CDC) resource, keeps you informed about changes in a given table. When you add, update, or delete a table row, the CDC mechanism generates a change record where it specifies the primary key of the row and writes it to the topic partition corresponding to this key. A topic is an entity for storing unstructured messages and delivering them to multiple subscribers. Basically, a topic is a named set of messages.

Example UsageExample Usage

//
// Create a new YDB Table Change feed.
//
resource "yandex_ydb_table_changefeed" "ydb_changefeed" {
  table_id = yandex_ydb_table.test_table_2.id
  name     = "changefeed"
  mode     = "NEW_IMAGE"
  format   = "JSON"

  consumer {
    name = "test_consumer"
  }
}

SchemaSchema

RequiredRequired

  • format (String) Changefeed format.
  • mode (String) Changefeed mode.
  • name (String) Changefeed name.

OptionalOptional

  • connection_string (String) Connection string, conflicts with table_id.
  • consumer (Block List) Changefeed consumers - named entities for reading data from the topic. (see below for nested schema)
  • retention_period (String) Time of data retention in the topic, ISO 8601 format.
  • table_id (String) Terraform resource ID of the table.
  • table_path (String) Table path.
  • timeouts (Block, Optional) (see below for nested schema)
  • virtual_timestamps (Boolean) Use virtual timestamps.

Read-OnlyRead-Only

  • id (String) The ID of this resource.

Nested Schema for Nested Schema for consumer

Required:

  • name (String) Consumer name. It is used in the SDK or CLI to read data from the topic.

Optional:

  • important (Boolean)
  • starting_message_timestamp_ms (Number) Timestamp in the UNIX timestamp format, from which the consumer will start reading data.
  • supported_codecs (List of String) Supported data encodings.

Nested Schema for Nested Schema for timeouts

Optional:

  • create (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
  • default (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
  • delete (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
  • read (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
  • update (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

ImportImport

The resource can be imported by using their resource ID. For getting the resource ID you can use Yandex Cloud Web Console or YC CLI.

# terraform import yandex_ydb_table_changefeed.<resource Name> <resource Id>
terraform import yandex_ydb_table_changefeed.ydb_changefeed ...

Была ли статья полезна?

Предыдущая
ydb_table
Следующая
ydb_table_index
Проект Яндекса
© 2025 ТОО «Облачные Сервисы Казахстан»