Skip to content

Commit 9473260

Browse files
committed
terraform fixes
1 parent 79a3ebe commit 9473260

4 files changed

Lines changed: 15 additions & 6 deletions

File tree

infrastructure/terraform/components/api/module_sqs_amendments_queue.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ data "aws_iam_policy_document" "letter_updates_queue_policy" {
4141
condition {
4242
test = "ArnEquals"
4343
variable = "aws:SourceArn"
44-
values = [module.eventsub.sns_topic.arn]
44+
values = [module.eventsub.sns_topic_event_bus.arn]
4545
}
4646
}
4747

@@ -68,7 +68,7 @@ data "aws_iam_policy_document" "letter_updates_queue_policy" {
6868
condition {
6969
test = "ArnEquals"
7070
variable = "aws:SourceArn"
71-
values = [module.eventsub.sns_topic.arn]
71+
values = [module.eventsub.sns_topic_event_bus.arn]
7272
}
7373
}
7474
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "aws_sns_topic_subscription" "allocation_lambda" {
2-
topic_arn = module.eventsub.aws_sns_topic.sns_topic_event_bus.arn
2+
topic_arn = module.eventsub.sns_topic_event_bus.arn
33
protocol = "lambda"
44
endpoint = module.allocation_lambda.function_arn
55
}
@@ -9,5 +9,5 @@ resource "aws_lambda_permission" "allocation_lambda_sns" {
99
action = "lambda:InvokeFunction"
1010
function_name = module.allocation_lambda.function_name
1111
principal = "sns.amazonaws.com"
12-
source_arn = module.eventsub.aws_sns_topic.sns_topic_event_bus.arn
12+
source_arn = module.eventsub.sns_topic_event_bus.arn
1313
}

infrastructure/terraform/modules/eventsub/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
| Name | Description |
4141
|------|-------------|
4242
| <a name="output_s3_bucket_event_cache"></a> [s3\_bucket\_event\_cache](#output\_s3\_bucket\_event\_cache) | S3 Bucket ARN and Name for event cache |
43-
| <a name="output_sns_topic"></a> [sns\_topic](#output\_sns\_topic) | SNS Topic ARN and Name |
43+
| <a name="output_sns_topic_event_bus"></a> [sns\_topic\_event\_bus](#output\_sns\_topic\_event\_bus) | SNS Topic ARN and Name |
44+
| <a name="output_sns_topic_supplier"></a> [sns\_topic\_supplier](#output\_sns\_topic\_supplier) | SNS Topic ARN and Name |
4445
<!-- vale on -->
4546
<!-- markdownlint-enable -->
4647
<!-- END_TF_DOCS -->

infrastructure/terraform/modules/eventsub/outputs.tf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
output "sns_topic" {
1+
output "sns_topic_event_bus" {
22
description = "SNS Topic ARN and Name"
33
value = {
44
arn = aws_sns_topic.sns_topic_event_bus.arn
55
name = aws_sns_topic.sns_topic_event_bus.name
66
}
77
}
88

9+
output "sns_topic_supplier" {
10+
description = "SNS Topic ARN and Name"
11+
value = {
12+
arn = aws_sns_topic.sns_topic_supplier.arn
13+
name = aws_sns_topic.sns_topic_supplier.name
14+
}
15+
}
16+
917
output "s3_bucket_event_cache" {
1018
description = "S3 Bucket ARN and Name for event cache"
1119
value = var.enable_event_cache ? {

0 commit comments

Comments
 (0)