Skip to content

Commit 0c685a5

Browse files
committed
Rename "main" SNS topic to "eventsub_topic"
1 parent 50f2bb6 commit 0c685a5

17 files changed

+35
-35
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
resource "aws_lambda_event_source_mapping" "mi_updates_transformer_kinesis" {
2-
event_source_arn = aws_kinesis_stream.mi_change_stream.arn
3-
function_name = module.mi_updates_transformer.function_arn
4-
starting_position = "LATEST"
5-
batch_size = 10
6-
maximum_batching_window_in_seconds = 1
2+
event_source_arn = aws_kinesis_stream.mi_change_stream.arn
3+
function_name = module.mi_updates_transformer.function_arn
4+
starting_position = "LATEST"
5+
batch_size = 10
6+
maximum_batching_window_in_seconds = 1
77

88
depends_on = [
9-
module.mi_updates_transformer # ensures updates transformer exists
9+
module.mi_updates_transformer # ensures updates transformer exists
1010
]
1111
}

infrastructure/terraform/components/api/locals.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ locals {
2727
SUPPLIER_ID_HEADER = "nhsd-supplier-id",
2828
APIM_CORRELATION_HEADER = "nhsd-correlation-id",
2929
DOWNLOAD_URL_TTL_SECONDS = 60
30-
SNS_TOPIC_ARN = "${module.eventsub.sns_topic.arn}",
31-
EVENT_SOURCE = "/data-plane/supplier-api/${var.group}/${var.environment}/letters"
30+
SNS_TOPIC_ARN = "${module.eventsub.eventsub_topic.arn}",
31+
EVENT_SOURCE = "/data-plane/supplier-api/${var.group}/${var.environment}/letters"
3232
}
3333

3434
core_pdf_bucket_arn = "arn:aws:s3:::comms-${var.core_account_id}-eu-west-2-${var.core_environment}-api-stg-pdf-pipeline"

infrastructure/terraform/components/api/module_lambda_letter_status_update.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ data "aws_iam_policy_document" "letter_status_update" {
7878
]
7979

8080
resources = [
81-
module.letter_status_updates_queue.sqs_queue_arn
81+
module.letter_status_updates_queue.sqs_queue_arn
8282
]
8383
}
8484

@@ -91,7 +91,7 @@ data "aws_iam_policy_document" "letter_status_update" {
9191
]
9292

9393
resources = [
94-
module.eventsub.sns_topic.arn
94+
module.eventsub.eventsub_topic.arn
9595
]
9696
}
9797
}

infrastructure/terraform/components/api/module_lambda_letter_updates_transformer.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module "letter_updates_transformer" {
3636

3737
lambda_env_vars = merge(local.common_lambda_env_vars, {
3838
EVENTPUB_SNS_TOPIC_ARN = "${module.eventpub.sns_topic.arn}",
39-
EVENT_SOURCE = "/data-plane/supplier-api/${var.group}/${var.environment}/letters"
39+
EVENT_SOURCE = "/data-plane/supplier-api/${var.group}/${var.environment}/letters"
4040
})
4141
}
4242

infrastructure/terraform/components/api/module_sqs_letter_updates.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ data "aws_iam_policy_document" "letter_updates_queue_policy" {
3838
condition {
3939
test = "ArnEquals"
4040
variable = "aws:SourceArn"
41-
values = [module.eventsub.sns_topic.arn]
41+
values = [module.eventsub.eventsub_topic.arn]
4242
}
4343
}
4444

@@ -65,7 +65,7 @@ data "aws_iam_policy_document" "letter_updates_queue_policy" {
6565
condition {
6666
test = "ArnEquals"
6767
variable = "aws:SourceArn"
68-
values = [module.eventsub.sns_topic.arn]
68+
values = [module.eventsub.eventsub_topic.arn]
6969
}
7070
}
7171
}

infrastructure/terraform/components/api/modules_eventsub.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module "eventsub" {
2222
sns_success_logging_sample_percent = var.sns_success_logging_sample_percent
2323

2424
event_cache_expiry_days = 30
25-
enable_event_cache = var.enable_event_cache
25+
enable_event_cache = var.enable_event_cache
2626

2727
shared_infra_account_id = var.shared_infra_account_id
2828
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "aws_sns_topic_subscription" "eventsub_sqs_letter_updates" {
2-
topic_arn = module.eventsub.sns_topic.arn
2+
topic_arn = module.eventsub.eventsub_topic.arn
33
protocol = "sqs"
44
endpoint = module.sqs_letter_updates.sqs_queue_arn
55
}

infrastructure/terraform/modules/eventsub/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939

4040
| Name | Description |
4141
|------|-------------|
42+
| <a name="output_eventsub_topic"></a> [eventsub\_topic](#output\_eventsub\_topic) | SNS Topic ARN and Name |
4243
| <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 |
4444
<!-- vale on -->
4545
<!-- markdownlint-enable -->
4646
<!-- 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.main.name
14+
TopicName = aws_sns_topic.eventsub_topic.name
1515
}
1616
}

infrastructure/terraform/modules/eventsub/iam_role_firehose_role.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
resource "aws_iam_role" "firehose_role" {
22
count = var.enable_event_cache ? 1 : 0
33

4-
name = "${local.csi}-firehose-role"
5-
assume_role_policy = data.aws_iam_policy_document.firehose_assume_role[0].json
4+
name = "${local.csi}-firehose-role"
5+
assume_role_policy = data.aws_iam_policy_document.firehose_assume_role[0].json
66
}
77

88
data "aws_iam_policy_document" "firehose_assume_role" {

0 commit comments

Comments
 (0)