Skip to content

Commit

Permalink
add notification for excel files
Browse files Browse the repository at this point in the history
  • Loading branch information
dysmento committed Jan 8, 2024
1 parent bbd864d commit 53d389a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion terraform/functions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ resource "aws_s3_object" "lambda_artifact-cpfValidation" {
}

resource "aws_s3_bucket_notification" "json_notification" {
bucket = aws_s3_bucket.cpf_uploads_bucket.bucket
bucket = module.cpf_uploads_bucket.bucket_id

lambda_function {
lambda_function_arn = module.lambda_function-cpfValidation.lambda_function_arn
Expand All @@ -188,6 +188,16 @@ resource "aws_s3_bucket_notification" "json_notification" {
}
}

resource "aws_s3_bucket_notification" "excel_notification" {
bucket = module.cpf_uploads_bucket.bucket_id

lambda_function {
lambda_function_arn = module.lambda_function-excelToJson.lambda_function_arn
events = ["s3:ObjectCreated:*"]
filter_suffix = ".xlsm"
}
}

module "lambda_function-graphql" {
source = "terraform-aws-modules/lambda/aws"
version = "6.5.0"
Expand Down

0 comments on commit 53d389a

Please sign in to comment.