yandex_ydb_table_changefeed (Resource)
Written by
Updated at August 7, 2025
Yandex Database table changefeed
Example 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"
}
}
Schema
Required
format(String) Changefeed format.mode(String) Changefeed mode .name(String) Changefeed name.
Optional
connection_string(String) Connection string, conflicts withtable_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-Only
id(String) The ID of this resource.
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 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).
Import
The resource can be imported by using their resource ID. For getting the resource ID you can use Yandex Cloud Web Console
# terraform import yandex_ydb_table_changefeed.<resource Name> <resource Id>
terraform import yandex_ydb_table_changefeed.ydb_changefeed ...