[Yandex Cloud documentation](../../index.md) > [Terraform in Yandex Cloud](../index.md) > Terraform reference > Resources > Cloud Logging > Data Sources > function_trigger

# yandex_function_trigger (DataSource)

Get information about a Yandex Cloud Function Trigger. For more information about Yandex Cloud Functions, see [Yandex Cloud Functions](../../functions/index.md).

This data source is used to define [Yandex Cloud Functions Trigger](../../functions/concepts/trigger/index.md) that can be used by other resources.

{% note warning %}

Either `trigger_id` or `name` must be specified.

{% endnote %}


## Example usage

```terraform
//
// Get information about existing Cloud Function Trigger.
//
data "yandex_function_trigger" "my_trigger" {
  trigger_id = "a1scn**********3ur32"
}
```

## Arguments & Attributes Reference

- `container` [Block]. [Yandex Cloud Serverless Container](../../serverless-containers/concepts/container.md) settings definition for Yandex Cloud Functions Trigger.
  - `id` (**Required**)(String). Yandex Cloud Serverless Container ID for Yandex Cloud Functions Trigger.
  - `path` (String). Path for Yandex Cloud Serverless Container for Yandex Cloud Functions Trigger.
  - `retry_attempts` (String). Retry attempts for Yandex Cloud Serverless Container for Yandex Cloud Functions Trigger.
  - `retry_interval` (String). Retry interval in seconds for Yandex Cloud Serverless Container for Yandex Cloud Functions Trigger.
  - `service_account_id` (String). Service account ID for Yandex Cloud Serverless Container for Yandex Cloud Functions Trigger.
- `container_registry` [Block]. [Container Registry](../../functions/concepts/trigger/cr-trigger.md) settings definition for Yandex Cloud Functions Trigger, if present.
  - `batch_cutoff` (**Required**)(String). Batch Duration in seconds for Yandex Cloud Functions Trigger.
  - `batch_size` (String). Batch Size for Yandex Cloud Functions Trigger.
  - `create_image` (Bool). Boolean flag for setting `create image` event for Yandex Cloud Functions Trigger.
  - `create_image_tag` (Bool). Boolean flag for setting `create image tag` event for Yandex Cloud Functions Trigger.
  - `delete_image` (Bool). Boolean flag for setting `delete image` event for Yandex Cloud Functions Trigger.
  - `delete_image_tag` (Bool). Boolean flag for setting `delete image tag` event for Yandex Cloud Functions Trigger.
  - `image_name` (String). Image name filter setting for Yandex Cloud Functions Trigger.
  - `registry_id` (**Required**)(String). Container Registry ID for Yandex Cloud Functions Trigger.
  - `tag` (String). Image tag filter setting for Yandex Cloud Functions Trigger.
- `created_at` (*Read-Only*) (String). The creation timestamp of the resource.
- `data_streams` [Block]. [Data Streams](../../functions/concepts/trigger/data-streams-trigger.md) settings definition for Yandex Cloud Functions Trigger, if present.
  - `batch_cutoff` (**Required**)(String). Batch Duration in seconds for Yandex Cloud Functions Trigger.
  - `batch_size` (String). Batch Size for Yandex Cloud Functions Trigger.
  - `database` (**Required**)(String). Stream database for Yandex Cloud Functions Trigger.
  - `service_account_id` (**Required**)(String). Service account ID to access data stream for Yandex Cloud Functions Trigger.
  - `stream_name` (**Required**)(String). Stream name for Yandex Cloud Functions Trigger.
  - `suffix` . 
- `description` (String). The resource description.
- `dlq` [Block]. Dead Letter Queue (DLQ) settings definition for Yandex Cloud Functions Trigger.
  - `queue_id` (**Required**)(String). ID of Dead Letter Queue for Trigger (Queue ARN).
  - `service_account_id` (**Required**)(String). Service Account ID for Dead Letter Queue for Yandex Cloud Functions Trigger.
- `folder_id` (String). The folder identifier that resource belongs to. If it is not provided, the default provider `folder-id` is used.
- `function` [Block]. [Yandex Cloud Function](../../functions/concepts/function.md) settings definition for Yandex Cloud Functions Trigger.
  - `id` (**Required**)(String). Yandex Cloud Function ID.
  - `retry_attempts` (String). Retry attempts for Yandex Cloud Function for Yandex Cloud Functions Trigger.
  - `retry_interval` (String). Retry interval in seconds for Yandex Cloud Function for Yandex Cloud Functions Trigger.
  - `service_account_id` (String). Service account ID for Yandex Cloud Function.
  - `tag` (String). Tag for Yandex Cloud Function for Yandex Cloud Functions Trigger.
- `id` (String). 
- `iot` [Block]. [IoT](../../functions/concepts/trigger/iot-core-trigger.md) settings definition for Yandex Cloud Functions Trigger, if present. Only one section `iot` or `message_queue`.
  - `batch_cutoff` (**Required**)(String). Batch Duration in seconds for Yandex Cloud Functions Trigger.
  - `batch_size` (String). Batch Size for Yandex Cloud Functions Trigger.
  - `device_id` (String). IoT Device ID for Yandex Cloud Functions Trigger.
  - `registry_id` (**Required**)(String). IoT Registry ID for Yandex Cloud Functions Trigger.
  - `topic` (String). IoT Topic for Yandex Cloud Functions Trigger.
- `labels` (Map Of String). A set of key/value label pairs which assigned to resource.
- `log_group` [Block]. Deprecated Logging settings definition for Yandex Cloud Functions Trigger. Please, use logging instead.
  - `batch_cutoff` (**Required**)(String). Batch Duration in seconds for Yandex Cloud Functions Trigger.
  - `batch_size` (String). Batch Size for Yandex Cloud Functions Trigger.
  - `log_group_ids` (**Required**)(Set Of String). Log group IDs for Yandex Cloud Functions Trigger.
- `logging` [Block]. [Logging](../../functions/concepts/trigger/cloud-logging-trigger.md) settings definition for Yandex Cloud Functions Trigger, if present.
  - `batch_cutoff` (**Required**)(String). Batch Duration in seconds for Yandex Cloud Functions Trigger.
  - `batch_size` (String). Batch Size for Yandex Cloud Functions Trigger.
  - `group_id` (**Required**)(String). Logging group ID for Yandex Cloud Functions Trigger.
  - `levels` (Set Of String). Logging level filter setting for Yandex Cloud Functions Trigger.
  - `resource_ids` (Set Of String). Resource ID filter setting for Yandex Cloud Functions Trigger.
  - `resource_types` (Set Of String). Resource type filter setting for Yandex Cloud Functions Trigger.
  - `stream_names` (Set Of String). Logging stream name filter setting for Yandex Cloud Functions Trigger.
- `mail` [Block]. [Mail](../../functions/concepts/trigger/mail-trigger.md) settings definition for Yandex Cloud Functions Trigger, if present.
  - `attachments_bucket_id` (String). Object Storage Bucket ID for Yandex Cloud Functions Trigger.
  - `batch_cutoff` (**Required**)(String). Batch Duration in seconds for Yandex Cloud Functions Trigger.
  - `batch_size` (String). Batch Size for Yandex Cloud Functions Trigger.
  - `service_account_id` (String). Service account ID to access object storage for Yandex Cloud Functions Trigger.
- `message_queue` [Block]. [Message Queue](../../functions/concepts/trigger/ymq-trigger.md) settings definition for Yandex Cloud Functions Trigger, if present.
  - `batch_cutoff` (**Required**)(String). Batch Duration in seconds for Yandex Cloud Functions Trigger.
  - `batch_size` (String). Batch Size for Yandex Cloud Functions Trigger.
  - `queue_id` (**Required**)(String). Message Queue ID for Yandex Cloud Functions Trigger.
  - `service_account_id` (**Required**)(String). Message Queue Service Account ID for Yandex Cloud Functions Trigger.
  - `visibility_timeout` (String). Visibility timeout for Yandex Cloud Functions Trigger.
- `name` (**Required**)(String). The resource name.
- `object_storage` [Block]. [Object Storage](../../functions/concepts/trigger/os-trigger.md) settings definition for Yandex Cloud Functions Trigger, if present.
  - `batch_cutoff` (**Required**)(String). Batch Duration in seconds for Yandex Cloud Functions Trigger.
  - `batch_size` (String). Batch Size for Yandex Cloud Functions Trigger.
  - `bucket_id` (**Required**)(String). Object Storage Bucket ID for Yandex Cloud Functions Trigger.
  - `create` (Bool). Boolean flag for setting `create` event for Yandex Cloud Functions Trigger.
  - `delete` (Bool). Boolean flag for setting `delete` event for Yandex Cloud Functions Trigger.
  - `prefix` (String). Prefix for Object Storage for Yandex Cloud Functions Trigger.
  - `suffix` (String). Suffix for Object Storage for Yandex Cloud Functions Trigger.
  - `update` (Bool). Boolean flag for setting `update` event for Yandex Cloud Functions Trigger.
- `timer` [Block]. [Timer](../../functions/concepts/trigger/timer.md) settings definition for Yandex Cloud Functions Trigger, if present.
  - `cron_expression` (**Required**)(String). Cron expression for timer for Yandex Cloud Functions Trigger.
  - `payload` (String). Payload to be passed to function.
- `trigger_id` (String). Yandex Cloud Functions Trigger id used to define trigger.
- `workflow` [Block]. Workflows settings definition for Yandex Cloud Functions Trigger.
  - `id` (**Required**)(String). Workflow ID.
  - `retry_attempts` (String). Retry attempts for Workflows.
  - `retry_interval` (String). Retry interval in seconds for Workflows.
  - `service_account_id` (**Required**)(String). Service account ID for Workflows.