aboutsummaryrefslogtreecommitdiffstats
path: root/events.tf
diff options
context:
space:
mode:
authorlian-manonog <160282780+lian-manonog@users.noreply.github.com>2024-08-15 13:58:46 +0100
committerGitHub <noreply@github.com>2024-08-15 13:58:46 +0100
commit2309062a8099c04bedd7f88638abf03ebf5f5171 (patch)
tree1bdebb2046a9b1356faa2fe902d9187601ecb3f7 /events.tf
parent848a86b7f3b9c5ce16cd774d19e3fa62ca8ffc68 (diff)
parenta009ffe72a2005e72e67345f728539e500b899f5 (diff)
downloadde-project-bentley-2309062a8099c04bedd7f88638abf03ebf5f5171.tar.gz
de-project-bentley-2309062a8099c04bedd7f88638abf03ebf5f5171.zip
Merge pull request #33 from ajschofield/tf-secrets-manager
PR: merge secrets manager with extract_lambda
Diffstat (limited to 'events.tf')
-rw-r--r--events.tf52
1 files changed, 0 insertions, 52 deletions
diff --git a/events.tf b/events.tf
deleted file mode 100644
index 25fb35b..0000000
--- a/events.tf
+++ /dev/null
@@ -1,52 +0,0 @@
-resource "aws_cloudwatch_event_rule" "lambda_trigger" {
- name = "lambda-scheduled-trigger"
- description = "Schedule to trigger the Lambda function"
- schedule_expression = "rate(30 minutes)"
-
-# event_pattern = jsonencode({
-# detail-type = [
-# "AWS Console Sign In via CloudTrail"
-# ]
-# })
-}
-
-
-resource "aws_cloudwatch_event_target" "lambda" {
- rule = aws_cloudwatch_event_rule.lambda_trigger.name
- target_id = "TargetFunctionV1"
- arn = aws_lambda_function.my_lambda_function.arn
-}
-
-
-
-resource "aws_lambda_permission" "allow_eventbridge" {
- statement_id = "AllowExecutionFromEventBridge"
- action = "lambda:InvokeFunction"
- function_name = aws_lambda_function.my_lambda_function.function_name
- principal = "events.amazonaws.com"
- source_arn = aws_cloudwatch_event_rule.lambda_trigger.arn
-}
-
-
-# below is step function 1
-resource "aws_lambda_permission" "allow_s3_ingestion" {
- statement_id = "AllowS3InvokeLambdaTransform"
- action = "lambda:InvokeFunction"
- function_name = aws_lambda_function.lambda_transform.function_name
- principal = "s3.amazonaws.com"
- source_arn = aws_s3_bucket.extract.arn
-}
-
-
-resource "aws_s3_bucket_notification" "extract_bucket_notification" {
- bucket = aws_s3_bucket.extract.id
-
- lambda_function {
- events = ["s3:ObjectCreated:*"]
- lambda_function_arn = aws_lambda_function.lambda_transform.arn
- }
-
- depends_on = [aws_lambda_permission.allow_s3_ingestion]
-}
-
-# need to duplicate and replace "2" with "3" \ No newline at end of file
git.ajschof.me — hosted by ajschofield — powered by cgit