File tree Expand file tree Collapse file tree 5 files changed +52
-2
lines changed
Expand file tree Collapse file tree 5 files changed +52
-2
lines changed Original file line number Diff line number Diff line change 4141 - name : Run Sandbox Cleanup Script
4242 run : ./venv/bin/python3 -u scripts/cleanup_sandboxes.py
4343 env :
44- GIT_WORKFLOW_PAT : ${{ secrets.GIT_WORKFLOW_PAT }} # Has "repo" and " workflow" privileges
44+ GIT_WORKFLOW_PAT : ${{ secrets.GIT_WORKFLOW_PAT }} # See https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a- workflow-dispatch-event
Original file line number Diff line number Diff line change @@ -73,6 +73,18 @@ module "ndr-lloyd-george-store" {
7373 ]
7474}
7575
76+ module "migration-dynamodb-segment-store" {
77+ source = " ./modules/s3/"
78+ access_logs_enabled = local. is_production
79+ access_logs_bucket_id = local. access_logs_bucket_id
80+ bucket_name = var. migration_dynamodb_segment_store_bucket_name
81+ enable_cors_configuration = false
82+ enable_bucket_versioning = true
83+ environment = var. environment
84+ owner = var. owner
85+ force_destroy = local. is_force_destroy
86+ }
87+
7688module "statistical-reports-store" {
7789 source = " ./modules/s3/"
7890 access_logs_enabled = local. is_production
Original file line number Diff line number Diff line change 1+ module "migration-dynamodb-segment-lambda" {
2+ source = " ./modules/lambda"
3+ name = " MigrationDynamodbSegment"
4+ handler = " handlers.migration_dynamodb_segment_handler.lambda_handler"
5+ lambda_timeout = 900
6+ memory_size = 1792
7+ iam_role_policy_documents = [
8+ module . migration-dynamodb-segment-store . s3_read_policy_document ,
9+ module . migration-dynamodb-segment-store . s3_write_policy_document ,
10+ data . aws_iam_policy_document . migration_dynamodb_access . json
11+ ]
12+ kms_deletion_window = var. kms_deletion_window
13+
14+ lambda_environment_variables = {
15+ WORKSPACE = terraform.workspace
16+ MIGRATION_SEGMENT_BUCKET_NAME = " ${ terraform . workspace } -${ var . migration_dynamodb_segment_store_bucket_name } "
17+ }
18+ is_gateway_integration_needed = false
19+ is_invoked_from_gateway = false
20+ }
21+
22+ data "aws_iam_policy_document" "migration_dynamodb_access" {
23+ statement {
24+ effect = " Allow"
25+ actions = [
26+ " dynamodb:DescribeTable"
27+ ]
28+ resources = [
29+ " arn:aws:dynamodb:${ data . aws_region . current . name } :${ data . aws_caller_identity . current . account_id } :table/${ terraform . workspace } _*"
30+ ]
31+ }
32+ }
Original file line number Diff line number Diff line change @@ -33,6 +33,12 @@ variable "docstore_bucket_name" {
3333 default = " ndr-document-store"
3434}
3535
36+ variable "migration_dynamodb_segment_store_bucket_name" {
37+ description = " The name of the S3 bucket to store the segments for DynamoDB migration."
38+ type = string
39+ default = " migration-dynamodb-segment-store"
40+ }
41+
3642variable "zip_store_bucket_name" {
3743 description = " The name of the S3 bucket used as a zip store."
3844 type = string
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ module "cloud_storage_security" {
6868 count = local. is_production ? 1 : 0
6969
7070 source = " cloudstoragesec/cloud-storage-security/aws"
71- version = " 1.8.9 +css9.02.001 " # Check https://help.cloudstoragesec.com/release-notes/latest-v9 for updates
71+ version = " 1.8.10 +css9.03.000 " # Check https://help.cloudstoragesec.com/release-notes/latest-v9 for updates
7272 cidr = [var . cloud_security_console_black_hole_address ] # This is a reserved address that does not lead anywhere to make sure CloudStorageSecurity console is not available
7373 email = data. aws_ssm_parameter . cloud_security_admin_email . value
7474 subnet_a_id = aws_subnet. virus_scanning_a [0 ]. id
You can’t perform that action at this time.
0 commit comments