diff --git a/terraform/environments/operations-engineering/audit_log_streaming_github.tf b/terraform/environments/operations-engineering/audit_log_streaming_github.tf index 0ee2acdf8ae..149dd73879c 100644 --- a/terraform/environments/operations-engineering/audit_log_streaming_github.tf +++ b/terraform/environments/operations-engineering/audit_log_streaming_github.tf @@ -1,7 +1,21 @@ +data "external" "build_lambdas" { + program = [ + "bash", "-c", + < /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] }