Targets
Full list
- Amazon DynamoDB
- Amazon Kinesis
- Amazon Lambda
- Amazon S3
- Amazon SNS
- Amazon SQS
- Container
- Datadog
- Event Display
- Function
- Google Cloud Firestore
- Google Cloud Storage
- Kafka
- Logz
- Sendgrid
- Slack
- Sockeye
- Splunk
- Twilio
- Zendesk
Amazon DynamoDB
target aws_dynamodb "my_table" {
arn = "arn:aws:dynamodb:us-east-2:123456789012:table/my-table"
credentials = secret_name("my-aws-access-keys")
//reply_to = <component>.<identifier>
}
Secret class: aws
Amazon Kinesis
target aws_kinesis "my_stream" {
arn = "arn:aws:kinesis:us-east-2:123456789012:stream/my-stream"
credentials = secret_name("my-aws-access-keys")
//reply_to = <component>.<identifier>
}
Secret class: aws
Amazon Lambda
target aws_lambda "my_userpool" {
arn = "arn:aws:cognito-idp:us-east-2:123456789012:userpool/my-pool"
credentials = secret_name("my-aws-access-keys")
//reply_to = <component>.<identifier>
}
Secret class: aws
Amazon S3
target aws_s3 "my_bucket" {
arn = "arn:aws:s3:::my-bucket"
credentials = secret_name("my-aws-access-keys")
//reply_to = <component>.<identifier>
}
Secret class: aws
Amazon SNS
target aws_sns "my_topic" {
arn = "arn:aws:sns:us-east-2:123456789012:my-topic"
credentials = secret_name("my-aws-access-keys")
//reply_to = <component>.<identifier>
}
Secret class: aws
Amazon SQS
target aws_sqs "my_queue" {
arn = "arn:aws:sqs:us-east-2:123456789012:my-queue"
credentials = secret_name("my-aws-access-keys")
//reply_to = <component>.<identifier>
}
Secret class: aws
Container
A single-container CloudEvents receiver which scales out automatically according to the number of concurrent requests, and scales down to zero when it doesn't receive any request for a certain amount of time.
target container "my_app" {
image = "registry.example.com/myapp:v1"
public = false // optional
// optional
env_var "ENV_VAR_LITERAL" {
value = "some value"
}
env_var "ENV_VAR_FROM_SECRET" {
value = secret_ref("secret-name", "secret-key")
}
}
This alternative, more compact syntax can be used for declaring environment variables, as long as all values have the same type (either literal string OR secret reference):
env_vars = {
ENV_VAR_1: "some value"
ENV_VAR_2: "another value"
}
Datadog
target datadog "my_metrics" {
metric_prefix = "myapp" // optional
auth = secret_name("my-datadog-credentials")
//reply_to = <component>.<identifier>
}
Secret class: datadog
Event Display
A CloudEvent receiver that logs received events to standard output. The service scales down to zero when it doesn't receive any request for a certain amount of time.
target event_display "debug" { }
Function
target function "my_function" {
runtime = "python"
entrypoint = "main" // optional
code = file("funcs/handler.py")
// optional, applies to functions that send CloudEvent responses
ce_context {
type = "my.target.v1.event"
source = "my_function" // optional
subject = "some_subject" // optional
}
public = false // optional
//reply_to = <component>.<identifier>
}
Google Cloud Firestore
target gcloud_firestore "my_bucket" {
default_collection = "users"
project_id = "my-project"
service_account = secret_name("my-gcloud-service-account")
//reply_to = <component>.<identifier>
}
Secret class: gcloud_service_account
Google Cloud Storage
target gcloud_storage "my_bucket" {
bucket_name = "my-bucket"
service_account = secret_name("my-gcloud-service-account")
//reply_to = <component>.<identifier>
}
Secret class: gcloud_service_account
Kafka
target kafka "my_topic" {
topic = "test1"
bootstrap_servers = ["server1:9092", "server2:9092"]
auth = secret_name("kafka-security-settings")
//reply_to = <component>.<identifier>
}
Secret class: kafka
Logz
target logz "my_logs" {
logs_listener_url = "listener.logz.io"
auth = secret_name("my-logz-credentials")
//reply_to = <component>.<identifier>
}
Secret class: logz
Sendgrid
target sendgrid "email_notifications" {
default_from_email = "jane@example.com" // optional
default_from_name = "Jane" // optional
default_to_email = "woodford@example.com" // optional
default_to_name = "Woodford" // optional
default_subject = "Notification" // optional
auth = secret_name("my-sendgrid-credentials")
//reply_to = <component>.<identifier>
}
Secret class: sendgrid
Slack
target slack "my_channel" {
auth = secret_name("my-slack-credentials")
//reply_to = <component>.<identifier>
}
Secret class: slack
Sockeye
A CloudEvent receiver that embeds a web UI which allows visualizing received events in real time. The service is exposed at a public URL via an ingress gateway, and scales down to zero when it doesn't receive any request for a certain amount of time.
target sockeye "debug" { }
Splunk
target splunk "my_event_collector" {
endpoint = "https://prd-x-12345.splunkcloud.com"
index = "default" // optional
skip_tls_verify = false // optional
auth = secret_name("my-splunk-credentials")
//reply_to = <component>.<identifier>
}
Secret class: splunk_hec
Twilio
target twilio "sms_notifications" {
default_phone_from = "+10000000000" // optional
default_phone_to = "+10000000000" // optional
auth = secret_name("my-twilio-credentials")
//reply_to = <component>.<identifier>
}
Secret class: twilio
Zendesk
target zendesk "customer_tickets" {
subdomain = "mycompany"
email = "woodford@example.com"
api_auth = secret_name("my-zendesk-api-token")
subject = "Ticket from TriggerMesh"
//reply_to = <component>.<identifier>
}
Secret class: zendesk