Provides an SES event destination
resource "aws_ses_event_destination" "cloudwatch" {
name = "event-destination-cloudwatch"
configuration_set_name = aws_ses_configuration_set.example.name
enabled = true
matching_types = ["bounce", "send"]
cloudwatch_destination {
default_value = "default"
dimension_name = "dimension"
value_source = "emailHeader"
}
}
resource "aws_ses_event_destination" "kinesis" {
name = "event-destination-kinesis"
configuration_set_name = aws_ses_configuration_set.example.name
enabled = true
matching_types = ["bounce", "send"]
kinesis_destination {
stream_arn = aws_kinesis_firehose_delivery_stream.example.arn
role_arn = aws_iam_role.example.arn
}
}
resource "aws_ses_event_destination" "sns" {
name = "event-destination-sns"
configuration_set_name = aws_ses_configuration_set.example.name
enabled = true
matching_types = ["bounce", "send"]
sns_destination {
topic_arn = aws_sns_topic.example.arn
}
}
This resource supports the following arguments:
name
- (Required) The name of the event destinationconfiguration_set_name
- (Required) The name of the configuration setenabled
- (Optional) If true, the event destination will be enabledmatching_types
- (Required) A list of matching types. May be any of "send"
, "reject"
, "bounce"
, "complaint"
, "delivery"
, "open"
, "click"
, or "renderingFailure"
.cloudwatch_destination
- (Optional) CloudWatch destination for the eventskinesis_destination
- (Optional) Send the events to a kinesis firehose destinationsns_destination
- (Optional) Send the events to an SNS Topic destinationdefault_value
- (Required) The default value for the eventdimension_name
- (Required) The name for the dimensionvalue_source
- (Required) The source for the value. May be any of "messageTag"
, "emailHeader"
or "linkTag"
.stream_arn
- (Required) The ARN of the Kinesis Streamrole_arn
- (Required) The ARN of the role that has permissions to access the Kinesis Streamtopic_arn
- (Required) The ARN of the SNS topicThis resource exports the following attributes in addition to the arguments above:
id
- The SES event destination name.arn
- The SES event destination ARN.In Terraform v1.5.0 and later, use an import
block to import SES event destinations using configuration_set_name
together with the event destination's name
. For example:
import {
to = aws_ses_event_destination.sns
id = "some-configuration-set-test/event-destination-sns"
}
Using terraform import
, import SES event destinations using configuration_set_name
together with the event destination's name
. For example:
% terraform import aws_ses_event_destination.sns some-configuration-set-test/event-destination-sns