-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from terraform-modules/feature-ses-sns
Feature ses sns
- Loading branch information
Showing
7 changed files
with
129 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| locals { | ||
| _module_version = "1.8.0" | ||
| _module_version = "1.8.1" | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| data "aws_kms_alias" "sns" { | ||
| name = "alias/aws/sns" | ||
| } | ||
|
|
||
| data "aws_iam_policy_document" "ses_event" { | ||
| statement { | ||
| effect = "Alow" | ||
| actions = [ | ||
| "kms:GenerateDataKey*", | ||
| "kms:Decrypt", | ||
| ] | ||
| resources = [data.aws_kms_alias.sns.arn] | ||
| principals { | ||
| type = "Service" | ||
| identifiers = ["ses.amazonaws.com"] | ||
| } | ||
| } | ||
| statement { | ||
| effect = "Alow" | ||
| actions = ["sns:Publish"] | ||
| resources = [aws_sns_topic.ses_event[0].arn] | ||
| principals { | ||
| type = "Service" | ||
| identifiers = ["ses.amazonaws.com"] | ||
| } | ||
| } | ||
| } | ||
|
|
||
| # { | ||
| # "Statement": [{ | ||
| # "Effect": "Allow", | ||
| # "Action": [ | ||
| # "kms:GenerateDataKey", | ||
| # "kms:Decrypt" | ||
| # ], | ||
| # "Resource": "arn:aws:kms:us-east-2:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab" | ||
| # }, { | ||
| # "Effect": "Allow", | ||
| # "Action": [ | ||
| # "sns:Publish" | ||
| # ], | ||
| # "Resource": "arn:aws:sns:*:123456789012:MyTopic" | ||
| # }] | ||
| # } | ||
| # Enable compatibility between event sources from AWS services and encrypted topics | ||
| # Several AWS services publish events to Amazon SNS topics. To allow these event sources to work with encrypted topics, you must perform the following steps. | ||
| # | ||
| # Use a customer managed CMK. For more information, see Creating Keys in the AWS Key Management Service Developer Guide. | ||
| # | ||
| # To allow the AWS service to have the kms:GenerateDataKey* and kms:Decrypt permissions, add the following statement to the CMK policy. | ||
| # | ||
| # { | ||
| # "Statement": [{ | ||
| # "Effect": "Allow", | ||
| # "Principal": { | ||
| # "Service": "service.amazonaws.com" | ||
| # }, | ||
| # "Action": [ | ||
| # "kms:GenerateDataKey*", | ||
| # "kms:Decrypt" | ||
| # ], | ||
| # "Resource": "*" | ||
| # }] | ||
| # } | ||
| # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters