Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Setting up Yandex Cloud Terraform provider authentication
  • Solution library
    • Overview
    • Release notes
          • ydb_database_dedicated
          • ydb_database_iam_binding
          • ydb_database_iam_member
          • ydb_database_serverless
          • ydb_table
          • ydb_table_changefeed
          • ydb_table_index
          • ydb_topic

In this article:

  • Example usage
  • Arguments & Attributes Reference
  • Import
  1. Terraform reference
  2. Resources
  3. Managed Service for YDB
  4. Resources
  5. ydb_table_changefeed

yandex_ydb_table_changefeed (Resource)

Written by
Yandex Cloud
Updated at April 9, 2026
View in Markdown
  • Example usage
  • Arguments & Attributes Reference
  • 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"
  }
}

Arguments & Attributes ReferenceArguments & Attributes Reference

  • connection_string (String). Connection string, conflicts with table_id.
  • format (Required)(String). Changefeed format.
  • id (String).
  • mode (Required)(String). Changefeed mode.
  • name (Required)(String). Changefeed name.
  • 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.
  • virtual_timestamps (Bool). Use virtual timestamps.
  • consumer [Block]. Changefeed consumers - named entities for reading data from the topic.
    • important (Bool).
    • name (Required)(String). Consumer name. It is used in the SDK or CLI to read data from the topic.
    • 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.
  • timeouts [Block].
    • create (String).
    • default (String).
    • delete (String).
    • read (String).
    • update (String).

ImportImport

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

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

Was the article helpful?

Previous
ydb_table
Next
ydb_table_index
© 2026 Direct Cursus Technology L.L.C.