Skip to content

Commit

Permalink
🔧 Fix Cloud Trail Integration By Providing Manually Created ARN
Browse files Browse the repository at this point in the history
  • Loading branch information
connormaglynn committed Jan 15, 2025
1 parent 07885bc commit fb2c971
Showing 1 changed file with 1 addition and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,6 @@ 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 = aws_cloudtrail_channel.github_channel.arn
cloudtrail_lake_channel_arn = "arn:aws:cloudtrail:eu-west-2:211125434264:channel/810d471f-21e9-4552-b839-9e334f7fbe51"
github_audit_allow_list = ".*"
}

resource "aws_cloudtrail_event_data_store" "github_audit_logs" {
name = "github-audit-logs-store"
retention_period = 90
termination_protection_enabled = true

advanced_event_selector {
name = "GitHubAuditLogs"
field_selector {
field = "eventSource"
equals = ["GitHub"]
}
}
}

resource "aws_cloudtrail_channel" "github_channel" {
name = "github-audit-log-channel"
source = "Github"
destinations = [aws_cloudtrail_event_data_store.github_audit_logs.arn]
advanced_event_selector = aws_cloudtrail_event_data_store.github_audit_logs.advanced_event_selector
}

0 comments on commit fb2c971

Please sign in to comment.