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.
🔧 Build Lambda Functions on The Fly
- Loading branch information
1 parent
fb2c971
commit 1a421b5
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
terraform/environments/operations-engineering/audit_log_streaming_github.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 |
---|---|---|
@@ -1,7 +1,21 @@ | ||
data "external" "build_lambdas" { | ||
program = [ | ||
"bash", "-c", | ||
<<EOT | ||
cd .terraform/modules/github-cloudtrail-auditlog && | ||
make all > /dev/null 2>&1 && | ||
echo '{"status": "success"}' | ||
EOT | ||
] | ||
} | ||
|
||
module "github-cloudtrail-auditlog" { | ||
source = "github.com/ministryofjustice/operations-engineering-cloudtrail-lake-github-audit-log-terraform-module?ref=main" | ||
create_github_auditlog_s3bucket = true | ||
github_auditlog_s3bucket = "github-audit-log-landing" | ||
cloudtrail_lake_channel_arn = "arn:aws:cloudtrail:eu-west-2:211125434264:channel/810d471f-21e9-4552-b839-9e334f7fbe51" | ||
github_audit_allow_list = ".*" | ||
|
||
# Ensure the module waits for Lambdas to be built | ||
depends_on = [data.external.build_lambdas] | ||
} |