-
Notifications
You must be signed in to change notification settings - Fork 0
[PRMP-195] Write to dynamo (bulk upload report) table for invalid file names #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 30 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
973aa1f
added v2 lambdas and sqs queue update
samfallowfield deb0ed7
updated feature flags to add flag for v2BulkUploadLambdaEnabled
samfallowfield 10f59f4
removed duplicate names
samfallowfield da88bf2
PRMT-574 updated queues.tf and vt bulk upload
samfallowfield 937596f
PRMT-574 update feature flag name
samfallowfield b2bee53
PRMT-574 update to only deploy V2 to deploy to sandboxes or dev curre…
samfallowfield a26221f
PRMT-574 applied formatting
samfallowfield ae27558
PRMT-574 updated Count for deployment
samfallowfield c833d92
PRMT-574 type fix
samfallowfield c524a7b
PRMT-574 updated to include list index
samfallowfield efe0316
PRMT-574 updated to include list index
samfallowfield c468157
Merge branch 'main' into PRMT-574
MohammadIqbalAD-NHS 9cf94c6
PRMT-574 Remove outdated VAR
samfallowfield e95da1e
Merge remote-tracking branch 'origin/PRMT-574' into PRMT-574
samfallowfield 96643c9
[PRMT-575] - Modify V2 lambdas to use V2 handlers
MohammadIqbalAD-NHS daa69c3
PRMT-574 Created resources for toggle V2 Bulk upload lambda
samfallowfield 21dd4ed
PRMT-574 remove reliance on unneeded handler
samfallowfield eb4a1e2
Merge branch 'PRMT-574' of github.com:nhsconnect/national-document-re…
samfallowfield 6eb5653
PRMT-574 Added limit to only deploy toggle as far as dev
samfallowfield 8454b51
PRMT-574 update format
samfallowfield 258452d
PRMT-574 list fix
samfallowfield 0f24173
[PRMT-575] - Add lambda DynamoDB environment variables
MohammadIqbalAD-NHS c55b71d
[PRMT-575] - Remove duplicate resources other than V2 Lambda
MohammadIqbalAD-NHS 1b966fc
Merge branch 'main' into PRMT-575
MohammadIqbalAD-NHS 84ca69a
[PRMT-575] - Re-add toggle lambda iam policy
MohammadIqbalAD-NHS 5d9b233
[PRMT-575] - Add environment variable and iam permissions for V2 lambda
MohammadIqbalAD-NHS e03caee
[PRMT-575] - Add permission to interact with bulkUploadReport table
MohammadIqbalAD-NHS a6ae625
[PRMT-575] - Undo line change
MohammadIqbalAD-NHS b72b29d
Merge branch 'main' into PRMT-575
MohammadIqbalAD-NHS 000060f
[PRMT-575] - Rename lambda resources
MohammadIqbalAD-NHS cd51d63
Merge branch 'main' into PRMT-575
MohammadIqbalAD-NHS b0a4df3
Merge branch 'main' into PRMT-575
MohammadIqbalAD-NHS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| module "bulk-upload-metadata-processor-lambda" { | ||
| source = "./modules/lambda" | ||
| name = "BulkUploadMetadataProcessor" | ||
| handler = "handlers.bulk_upload_metadata_processor_handler.lambda_handler" | ||
| lambda_timeout = 900 | ||
| memory_size = 1769 | ||
| iam_role_policy_documents = [ | ||
| module.ndr-bulk-staging-store.s3_read_policy_document, | ||
| module.ndr-bulk-staging-store.s3_write_policy_document, | ||
| module.bulk_upload_report_dynamodb_table.dynamodb_read_policy_document, | ||
| module.bulk_upload_report_dynamodb_table.dynamodb_write_policy_document, | ||
| module.sqs-lg-bulk-upload-metadata-queue.sqs_read_policy_document, | ||
| module.sqs-lg-bulk-upload-metadata-queue.sqs_write_policy_document, | ||
| module.ndr-app-config.app_config_policy | ||
| ] | ||
|
|
||
| rest_api_id = null | ||
| 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}" | ||
| LLOYD_GEORGE_BUCKET_NAME = "${terraform.workspace}-${var.lloyd_george_bucket_name}" | ||
| LLOYD_GEORGE_DYNAMODB_NAME = "${terraform.workspace}_${var.lloyd_george_dynamodb_table_name}" | ||
| METADATA_SQS_QUEUE_URL = module.sqs-lg-bulk-upload-metadata-queue.sqs_url | ||
| } | ||
| is_gateway_integration_needed = false | ||
| is_invoked_from_gateway = false | ||
| } | ||
|
|
||
| module "bulk-upload-metadata-processor-alarm" { | ||
| source = "./modules/lambda_alarms" | ||
| lambda_function_name = module.bulk-upload-metadata-processor-lambda.function_name | ||
| lambda_timeout = module.bulk-upload-metadata-processor-lambda.timeout | ||
| lambda_name = "bulk_upload_metadata_processor_handler" | ||
| namespace = "AWS/Lambda" | ||
| alarm_actions = [module.bulk-upload-metadata-processor-alarm-topic.arn] | ||
| ok_actions = [module.bulk-upload-metadata-processor-alarm-topic.arn] | ||
| depends_on = [module.bulk-upload-metadata-processor-lambda, module.bulk-upload-metadata-processor-alarm-topic] | ||
| } | ||
|
|
||
| module "bulk-upload-metadata-processor-alarm-topic" { | ||
| source = "./modules/sns" | ||
| sns_encryption_key_id = module.sns_encryption_key.id | ||
| topic_name = "bulk-upload-metadata-processor-topic" | ||
| topic_protocol = "lambda" | ||
| topic_endpoint = module.bulk-upload-metadata-processor-lambda.lambda_arn | ||
| delivery_policy = jsonencode({ | ||
| "Version" : "2012-10-17", | ||
| "Statement" : [ | ||
| { | ||
| "Effect" : "Allow", | ||
| "Principal" : { | ||
| "Service" : "cloudwatch.amazonaws.com" | ||
| }, | ||
| "Action" : [ | ||
| "SNS:Publish", | ||
| ], | ||
| "Condition" : { | ||
| "ArnLike" : { | ||
| "aws:SourceArn" : "arn:aws:cloudwatch:eu-west-2:${data.aws_caller_identity.current.account_id}:alarm:*" | ||
| } | ||
| } | ||
| "Resource" : "*" | ||
| } | ||
| ] | ||
| }) | ||
|
|
||
| depends_on = [module.bulk-upload-metadata-processor-lambda, module.sns_encryption_key] | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.