Skip to content

Commit a9f4f9e

Browse files
committed
Revert more
1 parent 4f6e825 commit a9f4f9e

8 files changed

Lines changed: 13 additions & 68 deletions

File tree

infrastructure/terraform/components/api/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ No requirements.
3737

3838
| Name | Source | Version |
3939
|------|--------|---------|
40-
| <a name="module_allocation_lambda"></a> [allocation\_lambda](#module\_allocation\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-lambda.zip | n/a |
41-
| <a name="module_amendments_queue"></a> [amendments\_queue](#module\_amendments\_queue) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-sqs.zip | n/a |
4240
| <a name="module_authorizer_lambda"></a> [authorizer\_lambda](#module\_authorizer\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-lambda.zip | n/a |
4341
| <a name="module_domain_truststore"></a> [domain\_truststore](#module\_domain\_truststore) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-s3bucket.zip | n/a |
4442
| <a name="module_eventpub"></a> [eventpub](#module\_eventpub) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-eventpub.zip | n/a |
@@ -57,7 +55,6 @@ No requirements.
5755
| <a name="module_post_mi"></a> [post\_mi](#module\_post\_mi) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-lambda.zip | n/a |
5856
| <a name="module_s3bucket_test_letters"></a> [s3bucket\_test\_letters](#module\_s3bucket\_test\_letters) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-s3bucket.zip | n/a |
5957
| <a name="module_sqs_letter_updates"></a> [sqs\_letter\_updates](#module\_sqs\_letter\_updates) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-sqs.zip | n/a |
60-
| <a name="module_supplier_requests_queue"></a> [supplier\_requests\_queue](#module\_supplier\_requests\_queue) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.24/terraform-sqs.zip | n/a |
6158
| <a name="module_supplier_ssl"></a> [supplier\_ssl](#module\_supplier\_ssl) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-ssl.zip | n/a |
6259
| <a name="module_upsert_letter"></a> [upsert\_letter](#module\_upsert\_letter) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-lambda.zip | n/a |
6360
## Outputs

infrastructure/terraform/modules/eventsub/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@
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_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 |
43+
| <a name="output_sns_topic"></a> [sns\_topic](#output\_sns\_topic) | SNS Topic ARN and Name |
4544
<!-- vale on -->
4645
<!-- markdownlint-enable -->
4746
<!-- END_TF_DOCS -->

infrastructure/terraform/modules/eventsub/cloudwatch_metric_alarm_sns_delivery_failures.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ resource "aws_cloudwatch_metric_alarm" "sns_delivery_failures" {
1111
treat_missing_data = "notBreaching"
1212

1313
dimensions = {
14-
TopicName = aws_sns_topic.sns_topic_event_bus.name
14+
TopicName = aws_sns_topic.main.name
1515
}
1616
}

infrastructure/terraform/modules/eventsub/outputs.tf

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
output "sns_topic_event_bus" {
1+
output "sns_topic" {
22
description = "SNS Topic ARN and Name"
33
value = {
4-
arn = aws_sns_topic.sns_topic_event_bus.arn
5-
name = aws_sns_topic.sns_topic_event_bus.name
6-
}
7-
}
8-
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
4+
arn = aws_sns_topic.main.arn
5+
name = aws_sns_topic.main.name
146
}
157
}
168

infrastructure/terraform/modules/eventsub/sns_topic_event_bus.tf renamed to infrastructure/terraform/modules/eventsub/sns_topic.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
resource "aws_sns_topic" "sns_topic_event_bus" {
2-
name = "${local.csi}-event-bus-events"
1+
resource "aws_sns_topic" "main" {
2+
name = local.csi
33
kms_master_key_id = var.kms_key_arn
44

55
application_failure_feedback_role_arn = var.enable_sns_delivery_logging == true ? aws_iam_role.sns_delivery_logging_role[0].arn : null

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

infrastructure/terraform/modules/eventsub/sns_topic_supplier.tf

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)