Skip to content

Commit e23be34

Browse files
committed
Rename document review DynamoDB table to document upload review and update references in Lambda functions
Signed-off-by: NogaNHS <127490765+NogaNHS@users.noreply.github.com>
1 parent bf2e263 commit e23be34

8 files changed

+14
-20
lines changed

infrastructure/dynamo_db_review.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
module "document_upload_review_dynamodb_table" {
2-
count = local.is_production ? 0 : 1
32
source = "./modules/dynamo_db"
43
table_name = var.document_review_table_name
54
hash_key = "ID"

infrastructure/lambda-document-review-processor.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ module "document_review_processor_lambda" {
55
iam_role_policy_documents = [
66
module.document_review_queue.sqs_read_policy_document,
77
module.document_review_queue.sqs_write_policy_document,
8-
local.is_production ? "" : module.document_review_dynamodb_table[0].dynamodb_read_policy_document,
9-
local.is_production ? "" : module.document_review_dynamodb_table[0].dynamodb_write_policy_document,
8+
module.document_upload_review_dynamodb_table.dynamodb_read_policy_document,
9+
module.document_upload_review_dynamodb_table.dynamodb_write_policy_document,
1010
module.ndr-bulk-staging-store.s3_read_policy_document,
1111
module.ndr-bulk-staging-store.s3_write_policy_document,
1212
]
@@ -20,7 +20,7 @@ module "document_review_processor_lambda" {
2020
lambda_environment_variables = {
2121
PENDING_REVIEW_BUCKET_NAME = module.ndr-document-pending-review-store.bucket_id
2222
STAGING_STORE_BUCKET_NAME = module.ndr-bulk-staging-store.bucket_id
23-
DOCUMENT_REVIEW_DYNAMODB_NAME = local.is_production ? "" : module.document_review_dynamodb_table[0].table_name
23+
DOCUMENT_REVIEW_DYNAMODB_NAME = module.document_upload_review_dynamodb_table.table_name
2424
WORKSPACE = terraform.workspace
2525
}
2626
depends_on = []

infrastructure/lambda-get-document-review.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module "get_document_review_lambda" {
66
module.ndr-app-config.app_config_policy,
77
module.cloudfront_edge_dynamodb_table.dynamodb_read_policy_document,
88
module.cloudfront_edge_dynamodb_table.dynamodb_write_policy_document,
9-
local.is_production ? "" : module.document_review_dynamodb_table[0].dynamodb_read_policy_document,
9+
module.document_upload_review_dynamodb_table.dynamodb_read_policy_document,
1010
aws_iam_policy.ssm_access_policy.policy,
1111
module.ndr-document-pending-review-store.s3_read_policy_document
1212
]
@@ -22,7 +22,7 @@ module "get_document_review_lambda" {
2222
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
2323
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
2424
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
25-
DOCUMENT_REVIEW_DYNAMODB_NAME = local.is_production ? "" : module.document_review_dynamodb_table[0].table_name
25+
DOCUMENT_REVIEW_DYNAMODB_NAME = module.document_upload_review_dynamodb_table.table_name
2626
EDGE_REFERENCE_TABLE = module.cloudfront_edge_dynamodb_table.table_name
2727
CLOUDFRONT_URL = module.cloudfront-distribution-lg.cloudfront_url
2828
PRESIGNED_ASSUME_ROLE = aws_iam_role.get_document_review_presign.arn

infrastructure/lambda-mns-notification.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module "mns-notification-lambda" {
88
module.sqs-mns-notification-queue[0].sqs_write_policy_document,
99
module.lloyd_george_reference_dynamodb_table.dynamodb_write_policy_document,
1010
module.lloyd_george_reference_dynamodb_table.dynamodb_read_policy_document,
11-
local.is_production ? "" : module.document_upload_review_dynamodb_table[0].dynamodb_write_policy_document,
12-
local.is_production ? "" : module.document_upload_review_dynamodb_table[0].dynamodb_read_policy_document,
11+
module.document_upload_review_dynamodb_table.dynamodb_write_policy_document,
12+
module.document_upload_review_dynamodb_table.dynamodb_read_policy_document,
1313
aws_iam_policy.ssm_access_policy.policy,
1414
module.ndr-app-config.app_config_policy,
1515
aws_iam_policy.kms_mns_lambda_access[0].policy,
@@ -23,7 +23,7 @@ module "mns-notification-lambda" {
2323
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
2424
WORKSPACE = terraform.workspace
2525
LLOYD_GEORGE_DYNAMODB_NAME = module.lloyd_george_reference_dynamodb_table.table_name
26-
DOCUMENT_REVIEW_DYNAMODB_NAME = local.is_production ? "" : module.document_upload_review_dynamodb_table[0].table_name
26+
DOCUMENT_REVIEW_DYNAMODB_NAME = module.document_upload_review_dynamodb_table.table_name
2727
MNS_NOTIFICATION_QUEUE_URL = module.sqs-mns-notification-queue[0].sqs_url
2828
PDS_FHIR_IS_STUBBED = local.is_sandbox
2929
}

infrastructure/lambda-patch-document-review.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ module "patch_document_review_lambda" {
44
handler = "handlers.patch_document_review_handler.lambda_handler"
55
iam_role_policy_documents = [
66
module.ndr-app-config.app_config_policy,
7-
local.is_production ? "" : module.document_review_dynamodb_table[0].dynamodb_write_policy_document,
8-
local.is_production ? "" : module.document_review_dynamodb_table[0].dynamodb_read_policy_document,
7+
module.document_upload_review_dynamodb_table.dynamodb_write_policy_document,
8+
module.document_upload_review_dynamodb_table.dynamodb_read_policy_document,
99
aws_iam_policy.ssm_access_policy.policy,
1010
module.ndr-document-pending-review-store.s3_write_policy_document
1111
]
@@ -21,7 +21,7 @@ module "patch_document_review_lambda" {
2121
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
2222
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
2323
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
24-
DOCUMENT_REVIEW_DYNAMODB_NAME = local.is_production ? "" : module.document_review_dynamodb_table[0].table_name
24+
DOCUMENT_REVIEW_DYNAMODB_NAME = module.document_upload_review_dynamodb_table.table_name
2525
WORKSPACE = terraform.workspace
2626
}
2727
depends_on = [

infrastructure/lambda-search-document-review.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module "search_document_review_lambda" {
44
handler = "handlers.search_document_review_handler.lambda_handler"
55
iam_role_policy_documents = [
66
module.ndr-app-config.app_config_policy,
7-
local.is_production ? "" : module.document_review_dynamodb_table[0].dynamodb_read_policy_document,
7+
module.document_upload_review_dynamodb_table.dynamodb_read_policy_document,
88
aws_iam_policy.ssm_access_policy.policy
99
]
1010

@@ -19,7 +19,7 @@ module "search_document_review_lambda" {
1919
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
2020
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
2121
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
22-
DOCUMENT_REVIEW_DYNAMODB_NAME = local.is_production ? "" : module.document_review_dynamodb_table[0].table_name
22+
DOCUMENT_REVIEW_DYNAMODB_NAME = module.document_upload_review_dynamodb_table.table_name
2323
WORKSPACE = terraform.workspace
2424
}
2525
depends_on = [

infrastructure/moved-resources.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,3 @@ moved {
1313
from = module.update_doc_ref_alarm_topic
1414
to = module.update-doc-ref-alarm-topic
1515
}
16-
17-
moved {
18-
from = module.document_review_dynamodb_table
19-
to = module.document_upload_review_dynamodb_table
20-
}

infrastructure/variable.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ variable "alarm_state_history_table_name" {
176176
variable "document_review_table_name" {
177177
description = "The name of the DynamoDB table to store document review records."
178178
type = string
179-
default = "DocumentReview"
179+
default = "DocumentUploadReview"
180180
}
181181
# VPC Variables
182182

0 commit comments

Comments
 (0)