generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8820 from ministryofjustice/standard-lifecycle-v1
Adjust AWS S3 Lifecycle Management Intelligent Lifecycle
- Loading branch information
Showing
6 changed files
with
133 additions
and
84 deletions.
There are no files selected for viewing
This file contains 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
38 changes: 38 additions & 0 deletions
38
terraform/environments/digital-prison-reporting/dpr_aws_s3_data_lifecycle_migrate.tf
This file contains 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,38 @@ | ||
# Domain Builder Backend Lambda function | ||
module "aws_s3_data_migrate" { | ||
source = "./modules/lambdas/generic" | ||
|
||
enable_lambda = local.enable_s3_data_migrate_lambda | ||
name = local.lambda_s3_data_migrate_name | ||
s3_bucket = local.lambda_s3_data_migrate_code_s3_bucket | ||
s3_key = local.lambda_s3_data_migrate_code_s3_key | ||
handler = local.lambda_s3_data_migrate_handler | ||
runtime = local.lambda_s3_data_migrate_runtime | ||
policies = local.lambda_s3_data_migrate_policies | ||
tracing = local.lambda_s3_data_migrate_tracing | ||
|
||
log_retention_in_days = local.lambda_log_retention_in_days | ||
|
||
# Set timeout to the maximum of 900 seconds (15 minutes) | ||
timeout = 900 | ||
|
||
# Optional: Adjust memory size if needed | ||
memory_size = 2048 | ||
|
||
vpc_settings = { | ||
subnet_ids = [data.aws_subnet.data_subnets_a.id, data.aws_subnet.data_subnets_b.id, data.aws_subnet.data_subnets_c.id] | ||
security_group_ids = [aws_security_group.lambda_generic[0].id, ] | ||
} | ||
|
||
tags = merge( | ||
local.all_tags, | ||
{ | ||
Resource_Group = "dpr-operations" | ||
Jira = "DPR2-1368" | ||
Resource_Type = "lambda" | ||
Name = local.lambda_s3_data_migrate_name | ||
} | ||
) | ||
|
||
depends_on = [aws_iam_policy.s3_read_access_policy, aws_iam_policy.s3_read_write_policy, aws_iam_policy.kms_read_access_policy] | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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