Skip to content

Commit 24460f4

Browse files
committed
revert some event sub
1 parent 6c1ae90 commit 24460f4

2 files changed

Lines changed: 6 additions & 22 deletions

File tree

infrastructure/terraform/modules/eventsub/sns_topic_policy.tf

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
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
}

infrastructure/terraform/modules/eventsub/sns_topic_subscription_firehose.tf

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
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

0 commit comments

Comments
 (0)