Skip to content

Commit a600335

Browse files
authored
Enable CloudTrail log file validation (#220)
1 parent 340a11f commit a600335

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

‎terraform/cloudtrail.tf‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@
1010
// events. Neither is an organization trail, so neither covers the payer account
1111
// 504695638931.
1212
//
13-
// This file adopts what is there as-is. Four things are missing from both trails and are
13+
// This file adopts what is there as-is. Three things are missing from both trails and are
1414
// deliberately NOT added here, because each changes live behaviour and belongs in its own
1515
// ticket: KMS encryption (both use SSE-S3), a CloudWatch Logs destination (so there is no
16-
// alerting path off either trail), a bucket lifecycle configuration (logs accumulate
17-
// indefinitely), and the disagreement over log file validation, which is reproduced below
18-
// rather than resolved.
16+
// alerting path off either trail), and a bucket lifecycle configuration (logs accumulate
17+
// indefinitely).
1918
//
2019
// Everything here is skipped unless var.iam_only is false (see variables.tf). The bucket
2120
// names, bucket policies and the backend bucket selector all belong to the Hack for LA
@@ -239,16 +238,16 @@ resource "aws_s3_bucket_server_side_encryption_configuration" "management_events
239238
}
240239
}
241240

242-
// Log file validation is off on this trail and on for the other. That inconsistency is
243-
// reproduced rather than resolved -- turning it on is a live change and its own ticket.
241+
// Log file validation is enabled on both trails, so the two trails now agree.
242+
// Validation is on for both.
244243
resource "aws_cloudtrail" "management_events" {
245244
count = var.iam_only ? 0 : 1
246245

247246
name = "management-events"
248247
s3_bucket_name = aws_s3_bucket.management_events[0].id
249248
include_global_service_events = true
250249
is_multi_region_trail = true
251-
enable_log_file_validation = false
250+
enable_log_file_validation = true
252251

253252
advanced_event_selector {
254253
name = "Management events selector"

0 commit comments

Comments
 (0)