Skip to content

Commit 631f905

Browse files
[PRMP - 541] Enforce virus scans on expedite files (#506)
Co-authored-by: Robert Gaskin <[email protected]>
1 parent d7b8652 commit 631f905

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

infrastructure/lambda-bulk-upload-metadata-processor.tf

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ module "bulk-upload-metadata-processor-lambda" {
44
handler = "handlers.bulk_upload_metadata_processor_handler.lambda_handler"
55
lambda_timeout = 900
66
memory_size = 1769
7+
78
iam_role_policy_documents = [
89
module.ndr-bulk-staging-store.s3_read_policy_document,
910
module.ndr-bulk-staging-store.s3_write_policy_document,
1011
module.bulk_upload_report_dynamodb_table.dynamodb_read_policy_document,
1112
module.bulk_upload_report_dynamodb_table.dynamodb_write_policy_document,
1213
module.sqs-lg-bulk-upload-metadata-queue.sqs_read_policy_document,
1314
module.sqs-lg-bulk-upload-metadata-queue.sqs_write_policy_document,
14-
module.ndr-app-config.app_config_policy
15+
module.ndr-app-config.app_config_policy,
16+
aws_iam_policy.ssm_access_policy.policy,
17+
data.aws_iam_policy.aws_lambda_vpc_access_execution_role.policy,
1518
]
1619

17-
rest_api_id = null
18-
api_execution_arn = null
19-
2020
lambda_environment_variables = {
2121
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
2222
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
@@ -27,7 +27,15 @@ module "bulk-upload-metadata-processor-lambda" {
2727
LLOYD_GEORGE_BUCKET_NAME = "${terraform.workspace}-${var.lloyd_george_bucket_name}"
2828
LLOYD_GEORGE_DYNAMODB_NAME = "${terraform.workspace}_${var.lloyd_george_dynamodb_table_name}"
2929
METADATA_SQS_QUEUE_URL = module.sqs-lg-bulk-upload-metadata-queue.sqs_url
30+
31+
VIRUS_SCAN_STUB = !local.is_production
3032
}
33+
34+
vpc_subnet_ids = length(data.aws_security_groups.virus_scanner_api.ids) == 1 ? module.ndr-vpc-ui.private_subnets : []
35+
vpc_security_group_ids = length(data.aws_security_groups.virus_scanner_api.ids) == 1 ? [data.aws_security_groups.virus_scanner_api.ids[0]] : []
36+
37+
rest_api_id = null
38+
api_execution_arn = null
3139
is_gateway_integration_needed = false
3240
is_invoked_from_gateway = false
3341
}

0 commit comments

Comments
 (0)