Skip to content

Commit 001fbd4

Browse files
committed
shared kms key and pass var enabled notifications to module
1 parent 9cd3c8d commit 001fbd4

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

infrastructure/account/batch_processor_errors_sns_topic.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
resource "aws_sns_topic" "batch_processor_errors" {
22
name = "${var.environment}-batch-processor-errors"
3-
kms_master_key_id = aws_kms_key.batch_processor_errors_sns_encryption_key.arn
3+
kms_master_key_id = aws_kms_key.error_alerts_sns_encryption_key.arn
44
}
55

66
resource "aws_sns_topic_policy" "batch_processor_errors_topic_policy" {

infrastructure/account/fhir_api_errors_sns_topic.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
resource "aws_sns_topic" "fhir_api_errors" {
22
name = "${var.environment}-fhir-api-errors"
3-
kms_master_key_id = aws_kms_key.fhir_api_errors_sns_encryption_key.arn
3+
kms_master_key_id = aws_kms_key.error_alerts_sns_encryption_key.arn
44
}
55

66
resource "aws_sns_topic_policy" "fhir_api_errors_topic_policy" {

infrastructure/account/kms.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,6 @@ resource "aws_kms_alias" "batch_processor_errors_sns_encryption_key" {
222222
}
223223

224224
resource "aws_kms_alias" "fhir_api_errors_sns_encryption_key" {
225-
name = "alias/${var.environment}-batch-processor-errors-imms-sns-encryption"
225+
name = "alias/${var.environment}-fhir-api-errors-imms-sns-encryption"
226226
target_key_id = aws_kms_key.error_alerts_sns_encryption_key.key_id
227227
}

infrastructure/instance/endpoints.tf

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ data "aws_iam_policy_document" "logs_policy_document" {
99
source_policy_documents = [templatefile("${local.policy_path}/log.json", {})]
1010
}
1111
module "get_status" {
12-
source = "./modules/lambda"
13-
prefix = local.prefix
14-
short_prefix = local.short_prefix
15-
function_name = "get_status"
16-
image_uri = module.docker_image.image_uri
17-
policy_json = data.aws_iam_policy_document.logs_policy_document.json
18-
aws_sns_topic = data.aws_sns_topic.fhir_api_errors.arn
12+
source = "./modules/lambda"
13+
prefix = local.prefix
14+
short_prefix = local.short_prefix
15+
function_name = "get_status"
16+
image_uri = module.docker_image.image_uri
17+
policy_json = data.aws_iam_policy_document.logs_policy_document.json
18+
aws_sns_topic = data.aws_sns_topic.fhir_api_errors.arn
19+
error_alarm_notifications_enabled = var.error_alarm_notifications_enabled
1920
}
2021

2122
locals {

0 commit comments

Comments
 (0)