-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsns.tf
44 lines (36 loc) · 1.16 KB
/
sns.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
resource "aws_sns_topic" "splitQuery" {
name = "splitQuery"
}
resource "aws_sns_topic_subscription" "splitQuery" {
topic_arn = aws_sns_topic.splitQuery.arn
protocol = "lambda"
endpoint = module.lambda-splitQuery.lambda_function_arn
}
resource "aws_sns_topic" "performQuery" {
name = "performQuery"
}
resource "aws_sns_topic_subscription" "performQuery" {
topic_arn = aws_sns_topic.performQuery.arn
protocol = "lambda"
endpoint = module.lambda-performQuery.lambda_function_arn
}
# resource "aws_sns_topic" "indexer" {
# name = "indexer"
# }
# resource "aws_sns_topic_subscription" "indexer" {
# topic_arn = aws_sns_topic.indexer.arn
# protocol = "lambda"
# endpoint = module.lambda-indexer.lambda_function_arn
# }
resource "aws_sns_topic" "sesDeliveryLogger" {
name = "sesDeliveryLogger"
}
resource "aws_sns_topic_subscription" "sesDeliveryLogger" {
topic_arn = aws_sns_topic.sesDeliveryLogger.arn
protocol = "lambda"
endpoint = module.lambda-logEmailDelivery.lambda_function_arn
}
resource "aws_sns_topic_policy" "sesDeliveryLogger" {
arn = aws_sns_topic.sesDeliveryLogger.arn
policy = data.aws_iam_policy_document.ses-sns-access.json
}