Event Targets

An EventTarget is a delivery destination for EventRecords.

Resource Schema

Required

PropertyDescription
name
String
Event Target name.
target_type
String
Event Target type.
Possible values: email, webhook, slack_webhook, teams_webhook, amazon_sns, google_pubsub, folder
config
Dynamic
Event Target configuration. Folder targets accept path and format (json or csv).

Optional

PropertyDescription
workspace_id
Int64
Workspace ID. 0 means the default workspace or site-wide.
apply_to_all_workspaces
Bool
If true, this default-workspace target can receive events from all workspaces.
enabled
Bool
Whether this Event Target can receive events.
delivery_policy
Dynamic
Event Target delivery policy. Email and folder targets support batch_interval in seconds, between 600 and 86400.

Read Only

PropertyDescription
id
Int64
Event Target ID
created_at
String
Event Target create date/time.
updated_at
String
Event Target update date/time.

Example Resource

resource "files_event_target" "example_event_target" {
  name                    = "example"
  workspace_id            = 1
  apply_to_all_workspaces = true
  enabled                 = true
  config                  = "example"
  delivery_policy         = "example"
  target_type             = "example"
}

Resource Import

This Resource supports importing using the following syntax:

Example Import Command

# Event Targets can be imported by specifying the id.
terraform import files_event_target.example_event_target 1

Data Source Schema

Required

PropertyDescription
id
Int64
Event Target ID

Read Only

PropertyDescription
name
String
Event Target name.
target_type
String
Event Target type.
Possible values: email, webhook, slack_webhook, teams_webhook, amazon_sns, google_pubsub, folder
workspace_id
Int64
Workspace ID. 0 means the default workspace or site-wide.
apply_to_all_workspaces
Bool
If true, this default-workspace target can receive events from all workspaces.
enabled
Bool
Whether this Event Target can receive events.
config
Dynamic
Event Target configuration. Folder targets accept path and format (json or csv).
delivery_policy
Dynamic
Event Target delivery policy. Email and folder targets support batch_interval in seconds, between 600 and 86400.
created_at
String
Event Target create date/time.
updated_at
String
Event Target update date/time.

Example Data Source

data "files_event_target" "example_event_target" {
  id = 1
}