diff --git a/terraform/core/41-lambda-failure-alarms.tf b/terraform/core/41-lambda-failure-alarms.tf index 3a2203837..299f1995a 100644 --- a/terraform/core/41-lambda-failure-alarms.tf +++ b/terraform/core/41-lambda-failure-alarms.tf @@ -1,23 +1,71 @@ module "ringgo_sftp_ingestion_lambda_alarm" { - count = local.is_production_environment ? 1 : 0 - source = "../modules/lambda-alarms-and-monitoring" - tags = module.tags.values - identifier_prefix = local.short_identifier_prefix - lambda_name = "${local.short_identifier_prefix}sftp-to-s3" - project = var.project - environment = var.environment - alarms_handler_lambda_name = module.lambda_alarms_handler[0].lambda_name - alarms_handler_lambda_arn = module.lambda_alarms_handler[0].lambda_arn + count = local.is_production_environment ? 1 : 0 + source = "../modules/lambda-alarms-and-monitoring" + tags = module.tags.values + identifier_prefix = local.short_identifier_prefix + lambda_name = "${local.short_identifier_prefix}sftp-to-s3" + project = var.project + environment = var.environment + alarms_handler_lambda_name = module.lambda_alarms_handler[0].lambda_name + alarms_handler_lambda_arn = module.lambda_alarms_handler[0].lambda_arn } module "icaseworks_api_ingestion_lambda_alarm" { - count = local.is_production_environment ? 1 : 0 - source = "../modules/lambda-alarms-and-monitoring" - tags = module.tags.values - identifier_prefix = local.short_identifier_prefix - lambda_name = "${local.short_identifier_prefix}icaseworks-api-ingestion" - project = var.project - environment = var.environment - alarms_handler_lambda_name = module.lambda_alarms_handler[0].lambda_name - alarms_handler_lambda_arn = module.lambda_alarms_handler[0].lambda_arn + count = local.is_production_environment ? 1 : 0 + source = "../modules/lambda-alarms-and-monitoring" + tags = module.tags.values + identifier_prefix = local.short_identifier_prefix + lambda_name = "${local.short_identifier_prefix}icaseworks-api-ingestion" + project = var.project + environment = var.environment + alarms_handler_lambda_name = module.lambda_alarms_handler[0].lambda_name + alarms_handler_lambda_arn = module.lambda_alarms_handler[0].lambda_arn +} + +module "max_concurrency_lambda_alarm" { + count = local.is_production_environment ? 1 : 0 + source = "../modules/lambda-alarms-and-monitoring" + tags = module.tags.values + identifier_prefix = local.short_identifier_prefix + lambda_name = module.max_concurrency_lambda[0].lambda_name + project = var.project + environment = var.environment + alarms_handler_lambda_name = module.lambda_alarms_handler[0].lambda_name + alarms_handler_lambda_arn = module.lambda_alarms_handler[0].lambda_arn +} + +module "rds_snapshot_s3_to_s3_copie_lambda_alarm" { + count = local.is_production_environment ? 1 : 0 + source = "../modules/lambda-alarms-and-monitoring" + tags = module.tags.values + identifier_prefix = local.short_identifier_prefix + lambda_name = module.liberator_rds_snapshot_to_s3[0].rds_snapshot_s3_to_s3_copier_lambda_name + project = var.project + environment = var.environment + alarms_handler_lambda_name = module.lambda_alarms_handler[0].lambda_name + alarms_handler_lambda_arn = module.lambda_alarms_handler[0].lambda_arn +} + +module "export_rds_to_s3_snapshot_lambda_alarm" { + count = local.is_production_environment ? 1 : 0 + source = "../modules/lambda-alarms-and-monitoring" + tags = module.tags.values + identifier_prefix = local.short_identifier_prefix + lambda_name = module.liberator_rds_snapshot_to_s3[0].export_rds_to_s3_snapshot_lambda_name + project = var.project + environment = var.environment + alarms_handler_lambda_name = module.lambda_alarms_handler[0].lambda_name + alarms_handler_lambda_arn = module.lambda_alarms_handler[0].lambda_arn +} + +module "mtfh_export_lambda_lambda_alarm" { + count = local.is_production_environment ? 1 : 0 + source = "../modules/lambda-alarms-and-monitoring" + tags = module.tags.values + identifier_prefix = local.short_identifier_prefix + lambda_name = "${local.short_identifier_prefix}-mtfh-export-lambda" + project = var.project + environment = var.environment + alarms_handler_lambda_name = module.lambda_alarms_handler[0].lambda_name + alarms_handler_lambda_arn = module.lambda_alarms_handler[0].lambda_arn } diff --git a/terraform/modules/aws-lambda/99-outputs.tf b/terraform/modules/aws-lambda/99-outputs.tf index e03283b44..f1a6d4188 100644 --- a/terraform/modules/aws-lambda/99-outputs.tf +++ b/terraform/modules/aws-lambda/99-outputs.tf @@ -8,3 +8,7 @@ output "lambda_iam_role" { value = aws_iam_role.lambda_role.name } +output "lambda_name" { + description = "name of the lambda function" + value = aws_lambda_function.lambda.function_name +} diff --git a/terraform/modules/rds-snapshot-to-s3/99-outputs.tf b/terraform/modules/rds-snapshot-to-s3/99-outputs.tf index da7ee1b28..719a1f700 100644 --- a/terraform/modules/rds-snapshot-to-s3/99-outputs.tf +++ b/terraform/modules/rds-snapshot-to-s3/99-outputs.tf @@ -2,3 +2,13 @@ output "rds_snapshot_s3_to_s3_copier_lambda_role_arn" { description = "ARN for the s3_to_s3_copier_lambda_role" value = aws_iam_role.rds_snapshot_s3_to_s3_copier_lambda_role.arn } + +output "rds_snapshot_s3_to_s3_copier_lambda_name" { + description = "Name for the s3_to_s3_copier_lambda" + value = module.rds_snapshot_s3_to_s3_copier.lambda_name +} + +output "export_rds_to_s3_snapshot_lambda_name" { + description = "Name for the export_rds_to_s3_snapshot_lambda" + value = module.trigger_rds_snapshot_export.lambda_name +}