diff --git a/infrastructure/lambda-document-upload-check.tf b/infrastructure/lambda-document-upload-check.tf index e68b25855..2586e9f33 100644 --- a/infrastructure/lambda-document-upload-check.tf +++ b/infrastructure/lambda-document-upload-check.tf @@ -6,9 +6,12 @@ module "document_upload_check_lambda" { module.ndr-bulk-staging-store.s3_read_policy_document, module.ndr-bulk-staging-store.s3_write_policy_document, module.ndr-lloyd-george-store.s3_write_policy_document, + module.pdm-document-store.s3_write_policy_document, aws_iam_policy.ssm_access_policy.policy, module.lloyd_george_reference_dynamodb_table.dynamodb_read_policy_document, module.lloyd_george_reference_dynamodb_table.dynamodb_write_policy_document, + module.pdm_dynamodb_table.dynamodb_read_policy_document, + module.pdm_dynamodb_table.dynamodb_write_policy_document, data.aws_iam_policy.aws_lambda_vpc_access_execution_role.policy ] kms_deletion_window = var.kms_deletion_window @@ -16,9 +19,11 @@ module "document_upload_check_lambda" { http_methods = null api_execution_arn = null lambda_environment_variables = { - LLOYD_GEORGE_DYNAMODB_NAME = "${terraform.workspace}_${var.lloyd_george_dynamodb_table_name}" - STAGING_STORE_BUCKET_NAME = "${terraform.workspace}-${var.staging_store_bucket_name}" - LLOYD_GEORGE_BUCKET_NAME = "${terraform.workspace}-${var.lloyd_george_bucket_name}" + LLOYD_GEORGE_DYNAMODB_NAME = module.lloyd_george_reference_dynamodb_table.table_name + PDM_DYNAMODB_NAME = module.pdm_dynamodb_table.table_name + STAGING_STORE_BUCKET_NAME = module.ndr-bulk-staging-store.bucket_id + LLOYD_GEORGE_BUCKET_NAME = module.ndr-lloyd-george-store.bucket_id + PDM_BUCKET_NAME = module.pdm-document-store.bucket_id WORKSPACE = terraform.workspace VIRUS_SCAN_STUB = !local.is_production