File tree Expand file tree Collapse file tree
infrastructure/terraform/modules/eventsub Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- resource "aws_sns_topic_policy" "sns_topic_event_bus" {
2- arn = aws_sns_topic. sns_topic_event_bus . arn
3-
4- policy = data. aws_iam_policy_document . sns_topic_policy . json
5- }
6-
7- resource "aws_sns_topic_policy" "sns_topic_supplier" {
8- arn = aws_sns_topic. sns_topic_event_bus . arn
1+ resource "aws_sns_topic_policy" "main" {
2+ arn = aws_sns_topic. main . arn
93
104 policy = data. aws_iam_policy_document . sns_topic_policy . json
115}
@@ -35,7 +29,7 @@ data "aws_iam_policy_document" "sns_topic_policy" {
3529 ]
3630
3731 resources = [
38- aws_sns_topic . sns_topic_event_bus . arn ,
32+ aws_sns_topic . main . arn ,
3933 ]
4034
4135 condition {
@@ -63,7 +57,7 @@ data "aws_iam_policy_document" "sns_topic_policy" {
6357 }
6458
6559 resources = [
66- aws_sns_topic . sns_topic_event_bus . arn ,
60+ aws_sns_topic . main . arn ,
6761 ]
6862 }
6963}
Original file line number Diff line number Diff line change 1- resource "aws_sns_topic_subscription" "sns_topic_event_bus_firehose " {
1+ resource "aws_sns_topic_subscription" "firehose " {
22 count = var. enable_event_cache ? 1 : 0
33
4- topic_arn = aws_sns_topic. sns_topic_event_bus . arn
5- protocol = " firehose"
6- subscription_role_arn = aws_iam_role. sns_role . arn
7- endpoint = aws_kinesis_firehose_delivery_stream. main [0 ]. arn
8- raw_message_delivery = var. enable_firehose_raw_message_delivery
9- }
10-
11- resource "aws_sns_topic_subscription" "sns_topic_supplier_firehose" {
12- count = var. enable_event_cache ? 1 : 0
13-
14- topic_arn = aws_sns_topic. sns_topic_supplier . arn
4+ topic_arn = aws_sns_topic. main . arn
155 protocol = " firehose"
166 subscription_role_arn = aws_iam_role. sns_role . arn
177 endpoint = aws_kinesis_firehose_delivery_stream. main [0 ]. arn
You can’t perform that action at this time.
0 commit comments