Skip to content

Commit

Permalink
PRMP-841: Update bulk upload summary and individual ODS reports (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
RioKnightleyNHS authored Sep 26, 2024
1 parent a12e9b1 commit c0524e0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion infrastructure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.66.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.57.0 |

## Modules

Expand Down
16 changes: 8 additions & 8 deletions infrastructure/lambda-bulk-upload-report.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module "bulk-upload-report-lambda" {
iam_role_policies = [
"arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole",
"arn:aws:iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy",
module.ndr-bulk-staging-store.s3_object_access_policy,
module.statistical-reports-store.s3_object_access_policy,
module.bulk_upload_report_dynamodb_table.dynamodb_policy,
aws_iam_policy.dynamodb_policy_scan_bulk_report.arn,
module.ndr-app-config.app_config_policy_arn
Expand All @@ -14,20 +14,20 @@ module "bulk-upload-report-lambda" {
api_execution_arn = null

lambda_environment_variables = {
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
WORKSPACE = terraform.workspace
STAGING_STORE_BUCKET_NAME = "${terraform.workspace}-${var.staging_store_bucket_name}"
BULK_UPLOAD_DYNAMODB_NAME = "${terraform.workspace}_${var.bulk_upload_report_dynamodb_table_name}"
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
WORKSPACE = terraform.workspace
STATISTICAL_REPORTS_BUCKET = "${terraform.workspace}-${var.statistical_reports_bucket_name}"
BULK_UPLOAD_DYNAMODB_NAME = "${terraform.workspace}_${var.bulk_upload_report_dynamodb_table_name}"
}
is_gateway_integration_needed = false
is_invoked_from_gateway = false
memory_size = 512
lambda_timeout = 45

depends_on = [
module.ndr-bulk-staging-store,
module.statistical-reports-store,
module.bulk_upload_report_dynamodb_table,
module.ndr-app-config
]
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/schedules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,20 @@ resource "aws_cloudwatch_event_target" "bulk_upload_report_schedule_event" {
rule = aws_cloudwatch_event_rule.bulk_upload_report_schedule.name
target_id = "bulk_upload_report_schedule"
arn = module.bulk-upload-report-lambda.lambda_arn

depends_on = [
module.bulk-upload-report-lambda,
aws_cloudwatch_event_rule.bulk_upload_report_schedule

]
}

resource "aws_lambda_permission" "bulk_upload_report_schedule_permission" {
statement_id = "AllowExecutionFromCloudWatch"
action = "lambda:InvokeFunction"
function_name = module.bulk-upload-report-lambda.function_name
principal = "events.amazonaws.com"
source_arn = aws_cloudwatch_event_rule.bulk_upload_report_schedule.arn

depends_on = [
module.bulk-upload-report-lambda,
aws_cloudwatch_event_rule.bulk_upload_report_schedule
Expand Down
3 changes: 0 additions & 3 deletions infrastructure/variable.tf
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ variable "cloud_only_service_instances" {
default = 1
}


variable "mesh_component_name" {
type = string
default = "mesh-forwarder"
Expand Down Expand Up @@ -222,10 +221,8 @@ locals {
is_force_destroy = contains(["ndr-dev", "ndra", "ndrb", "ndrc", "ndrd", "ndr-test"], terraform.workspace)
is_sandbox_or_test = contains(["ndra", "ndrb", "ndrc", "ndrd", "ndr-test"], terraform.workspace)


bulk_upload_lambda_concurrent_limit = 5


api_gateway_subdomain_name = contains(["prod"], terraform.workspace) ? "${var.certificate_subdomain_name_prefix}" : "${var.certificate_subdomain_name_prefix}${terraform.workspace}"
api_gateway_full_domain_name = contains(["prod"], terraform.workspace) ? "${var.certificate_subdomain_name_prefix}${var.domain}" : "${var.certificate_subdomain_name_prefix}${terraform.workspace}.${var.domain}"

Expand Down
2 changes: 1 addition & 1 deletion virusscanner/terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.43.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.0 |

## Modules

Expand Down

0 comments on commit c0524e0

Please sign in to comment.