Skip to content

Commit bf2acaa

Browse files
committed
[PRMP-586] Update document review Lambda functions to include DynamoDB policies and table name
Signed-off-by: NogaNHS <[email protected]>
1 parent 26f7f5d commit bf2acaa

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

infrastructure/lambda-get-document-review.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ module "get_document_review_lambda" {
55
iam_role_policy_documents = [
66
module.ndr-app-config.app_config_policy,
77
module.cloudfront_edge_dynamodb_table.dynamodb_read_policy_document,
8-
module.cloudfront_edge_dynamodb_table.dynamodb_write_policy_document
8+
module.cloudfront_edge_dynamodb_table.dynamodb_write_policy_document,
9+
module.document_review_dynamodb_table.dynamodb_read_policy_document,
910
]
1011

1112
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
@@ -19,9 +20,10 @@ module "get_document_review_lambda" {
1920
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
2021
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
2122
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
22-
DOCUMENT_REVIEW_DYNAMODB_NAME = ""
23+
DOCUMENT_REVIEW_DYNAMODB_NAME = module.document_review_dynamodb_table.table_name
2324
EDGE_REFERENCE_TABLE = module.cloudfront_edge_dynamodb_table.table_name
2425
CLOUDFRONT_URL = module.cloudfront-distribution-lg.cloudfront_url
26+
PRESIGNED_ASSUME_ROLE = aws_iam_role.get_document_review_presign.arn
2527
WORKSPACE = terraform.workspace
2628
}
2729
depends_on = [

infrastructure/lambda-put-document-review.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ module "put_document_review_lambda" {
44
handler = "handlers.put_document_review_handler.lambda_handler"
55
iam_role_policy_documents = [
66
module.ndr-app-config.app_config_policy,
7+
module.document_review_dynamodb_table.dynamodb_write_policy_document,
8+
module.document_review_dynamodb_table.dynamodb_read_policy_document
79
]
810

911
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
@@ -17,10 +19,8 @@ module "put_document_review_lambda" {
1719
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
1820
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
1921
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
20-
DOCUMENT_REVIEW_DYNAMODB_NAME = ""
22+
DOCUMENT_REVIEW_DYNAMODB_NAME = module.document_review_dynamodb_table.table_name
2123
WORKSPACE = terraform.workspace
22-
23-
2424
}
2525
depends_on = [
2626
aws_api_gateway_rest_api.ndr_doc_store_api,

infrastructure/lambda-search-document-review.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +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+
module.document_review_dynamodb_table.dynamodb_read_policy_document
78
]
89

910
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
@@ -17,7 +18,7 @@ module "search_document_review_lambda" {
1718
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
1819
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
1920
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
20-
DOCUMENT_REVIEW_DYNAMODB_NAME = ""
21+
DOCUMENT_REVIEW_DYNAMODB_NAME = module.document_review_dynamodb_table.table_name
2122
WORKSPACE = terraform.workspace
2223

2324

0 commit comments

Comments
 (0)