-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resource/aws_ses_event_destination: Add support for SNS destinations #1737
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,8 @@ func TestAccAWSSESEventDestination_basic(t *testing.T) { | |
"aws_ses_event_destination.kinesis", "name", "event-destination-kinesis"), | ||
resource.TestCheckResourceAttr( | ||
"aws_ses_event_destination.cloudwatch", "name", "event-destination-cloudwatch"), | ||
resource.TestCheckResourceAttr( | ||
"aws_ses_event_destination.sns", "name", "event-destination-sns"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nitpick - but do you mind adding check for |
||
), | ||
}, | ||
}, | ||
|
@@ -156,6 +158,10 @@ data "aws_iam_policy_document" "fh_felivery_document" { | |
} | ||
} | ||
|
||
resource "aws_sns_topic" "ses_destination" { | ||
name = "ses-destination-test" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you mind randomizing this name here? |
||
} | ||
|
||
resource "aws_ses_configuration_set" "test" { | ||
name = "some-configuration-set-%d" | ||
} | ||
|
@@ -166,7 +172,7 @@ resource "aws_ses_event_destination" "kinesis" { | |
enabled = true, | ||
matching_types = ["bounce", "send"], | ||
|
||
kinesis_destination = { | ||
kinesis_destination { | ||
stream_arn = "${aws_kinesis_firehose_delivery_stream.test_stream.arn}", | ||
role_arn = "${aws_iam_role.firehose_role.arn}" | ||
} | ||
|
@@ -178,10 +184,22 @@ resource "aws_ses_event_destination" "cloudwatch" { | |
enabled = true, | ||
matching_types = ["bounce", "send"], | ||
|
||
cloudwatch_destination = { | ||
cloudwatch_destination { | ||
default_value = "default" | ||
dimension_name = "dimension" | ||
value_source = "emailHeader" | ||
} | ||
} | ||
|
||
resource "aws_ses_event_destination" "sns" { | ||
name = "event-destination-sns", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Likewise ^ do you mind randomizing it? |
||
configuration_set_name = "${aws_ses_configuration_set.test.name}", | ||
enabled = true, | ||
matching_types = ["bounce", "send"], | ||
|
||
sns_destination { | ||
topic_arn = "${aws_sns_topic.ses_destination.arn}" | ||
} | ||
} | ||
|
||
`, edRandomInteger) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly enough, this resource actually did appear to support multiple
cloudwatch_destination
previously, even if it wasn't appropriately acceptance tested. This change will likely be reverted in #6690