Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • 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
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Solution library
    • Overview
    • Release notes
          • serverless_eventrouter_bus
          • serverless_eventrouter_connector
          • serverless_eventrouter_rule

In this article:

  • Example Usage
  • Schema
  • Required
  • Optional
  • Read-Only
  • Nested Schema for container
  • Nested Schema for container.batch_settings
  • Nested Schema for function
  • Nested Schema for function.batch_settings
  • Nested Schema for gateway_websocket_broadcast
  • Nested Schema for gateway_websocket_broadcast.batch_settings
  • Nested Schema for logging
  • Nested Schema for timeouts
  • Nested Schema for workflow
  • Nested Schema for workflow.batch_settings
  • Nested Schema for yds
  • Nested Schema for ymq
  • Import
  1. Terraform reference
  2. Resources
  3. Serverless Integrations
  4. Resources
  5. serverless_eventrouter_rule

yandex_serverless_eventrouter_rule (Resource)

Written by
Yandex Cloud
Updated at August 7, 2025
  • Example Usage
  • Schema
    • Required
    • Optional
    • Read-Only
    • Nested Schema for container
    • Nested Schema for container.batch_settings
    • Nested Schema for function
    • Nested Schema for function.batch_settings
    • Nested Schema for gateway_websocket_broadcast
    • Nested Schema for gateway_websocket_broadcast.batch_settings
    • Nested Schema for logging
    • Nested Schema for timeouts
    • Nested Schema for workflow
    • Nested Schema for workflow.batch_settings
    • Nested Schema for yds
    • Nested Schema for ymq
  • Import

Allows management of a Yandex Cloud Serverless Event Router Rule.

Example UsageExample Usage

//
// TBD
//

SchemaSchema

RequiredRequired

  • bus_id (String) ID of the bus that the rule belongs to
  • name (String) Name of the rule

OptionalOptional

  • container (Block List) ContainerTarget (see below for nested schema)
  • description (String) Description of the rule
  • function (Block List) FunctionTarget (see below for nested schema)
  • gateway_websocket_broadcast (Block List) GatewayWebsocketBroadcastTarget (see below for nested schema)
  • jq_filter (String) JQ filter for matching events
  • labels (Map of String) Rule labels
  • logging (Block List) LoggingTarget. Includes either log_group_id or folder_id (see below for nested schema)
  • timeouts (Block, Optional) (see below for nested schema)
  • workflow (Block List) WorkflowTarget (see below for nested schema)
  • yds (Block List) YdsTarget (see below for nested schema)
  • ymq (Block List) YmqTarget (see below for nested schema)

Read-OnlyRead-Only

  • cloud_id (String) ID of the cloud that the rule resides in
  • created_at (String) Creation timestamp
  • deletion_protection (Boolean) Deletion protection
  • folder_id (String) ID of the folder that the rule resides in
  • id (String) The ID of this resource.

Nested Schema for Nested Schema for container

Required:

  • container_id (String) Container ID

Optional:

  • batch_settings (Block List, Max: 1) Batch settings (see below for nested schema)
  • container_revision_id (String) Container revision ID
  • path (String) Endpoint HTTP path to invoke
  • service_account_id (String) Service account which should be used to call a container

Nested Schema for Nested Schema for container.batch_settings

Required:

  • cutoff (String) Maximum batch size: rule will send a batch if its lifetime exceeds this value

Optional:

  • max_bytes (Number) Maximum batch size: rule will send a batch if total size of events exceeds this value
  • max_count (Number) Maximum batch size: rule will send a batch if number of events exceeds this value

Nested Schema for Nested Schema for function

Required:

  • function_id (String) Function ID

Optional:

  • batch_settings (Block List, Max: 1) Batch settings (see below for nested schema)
  • function_tag (String) Function tag
  • service_account_id (String) Service account which has call permission on the function

Nested Schema for Nested Schema for function.batch_settings

Required:

  • cutoff (String) Maximum batch size: rule will send a batch if its lifetime exceeds this value

Optional:

  • max_bytes (Number) Maximum batch size: rule will send a batch if total size of events exceeds this value
  • max_count (Number) Maximum batch size: rule will send a batch if number of events exceeds this value

Nested Schema for Nested Schema for gateway_websocket_broadcast

Required:

  • gateway_id (String) Gateway ID
  • path (String) Path
  • service_account_id (String) Service account which has permission for writing to websockets

Optional:

  • batch_settings (Block List, Max: 1) Batch settings (see below for nested schema)

Nested Schema for Nested Schema for gateway_websocket_broadcast.batch_settings

Required:

  • cutoff (String) Maximum batch size: rule will send a batch if its lifetime exceeds this value

Optional:

  • max_bytes (Number) Maximum batch size: rule will send a batch if total size of events exceeds this value
  • max_count (Number) Maximum batch size: rule will send a batch if number of events exceeds this value

Nested Schema for Nested Schema for logging

Required:

  • service_account_id (String) Service account which has permission for writing logs

Optional:

  • folder_id (String) Folder ID
  • log_group_id (String) Log group ID

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).
  • 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).

Nested Schema for Nested Schema for workflow

Required:

  • service_account_id (String) Service account which should be used to start workflow
  • workflow_id (String) Workflow ID

Optional:

  • batch_settings (Block List, Max: 1) Batch settings (see below for nested schema)

Nested Schema for Nested Schema for workflow.batch_settings

Required:

  • cutoff (String) Maximum batch size: rule will send a batch if its lifetime exceeds this value

Optional:

  • max_bytes (Number) Maximum batch size: rule will send a batch if total size of events exceeds this value
  • max_count (Number) Maximum batch size: rule will send a batch if number of events exceeds this value

Nested Schema for Nested Schema for yds

Required:

  • database (String) Stream database
  • service_account_id (String) Service account, which has write permission on the stream
  • stream_name (String) Full stream name, like /ru-central1/aoegtvhtp8ob********/cc8004q4lbo6********/test

Nested Schema for Nested Schema for ymq

Required:

  • queue_arn (String) Queue ARN. Example: yrn:yc:ymq:ru-central1:aoe***:test
  • service_account_id (String) Service account which has write access to the queue

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_serverless_eventrouter_rule.<resource Name> <resource Id>
terraform import yandex_serverless_eventrouter_rule.evr_rule ...

Was the article helpful?

Previous
serverless_eventrouter_connector
Next
smartcaptcha_captcha
© 2025 Direct Cursus Technology L.L.C.