-
Notifications
You must be signed in to change notification settings - Fork 0
/
ingest_upsert_archive_folders.tf
33 lines (32 loc) · 1.53 KB
/
ingest_upsert_archive_folders.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
locals {
ingest_upsert_archive_folders_lambda_name = "${local.environment}-dr2-ingest-upsert-archive-folders"
}
module "dr2_ingest_upsert_archive_folders_lambda" {
source = "git::https://github.com/nationalarchives/da-terraform-modules//lambda"
function_name = local.ingest_upsert_archive_folders_lambda_name
handler = "uk.gov.nationalarchives.ingestupsertarchivefolders.Lambda::handleRequest"
timeout_seconds = local.java_timeout_seconds
policies = {
"${local.ingest_upsert_archive_folders_lambda_name}-policy" = templatefile("./templates/iam_policy/ingest_upsert_archive_folders_policy.json.tpl", {
account_id = var.account_number
lambda_name = local.ingest_upsert_archive_folders_lambda_name
dynamo_db_file_table_arn = module.files_table.table_arn
secrets_manager_secret_arn = aws_secretsmanager_secret.preservica_read_update_metadata_insert_content.arn
})
}
memory_size = local.java_lambda_memory_size
runtime = local.java_runtime
plaintext_env_vars = {
FILES_DDB_TABLE = local.files_dynamo_table_name
PRESERVICA_SECRET_NAME = aws_secretsmanager_secret.preservica_read_update_metadata_insert_content.name
PRESERVICA_API_URL = data.aws_ssm_parameter.preservica_url.value
}
vpc_config = {
subnet_ids = module.vpc.private_subnets
security_group_ids = [module.outbound_https_access_only.security_group_id]
}
reserved_concurrency = 1
tags = {
Name = local.ingest_upsert_archive_folders_lambda_name
}
}