Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Solution library
    • Overview
    • Release notes
          • ydb_database_dedicated
          • ydb_database_iam_binding
          • 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 February 9, 2026
  • 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.

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.