Description
enable_logging = false stops this trail’s delivery. Other trails and the account’s management event history keep their own records.
Potential impact
The trail’s archive can have gaps even while recent management events appear in Event history.
Remediation
Set enable_logging = true on the existing trail. Confirm its event and Region coverage, perform a matching operation, then look for that event in S3. If the trail also delivers to CloudWatch Logs, check that destination too.
Examples
The examples change the trail name as well. Keep the current name when enabling an existing trail to avoid replacement. The destination bucket must allow CloudTrail to write logs.
Before
hcl
resource "aws_cloudtrail" "example" {
name = "trail-disabled"
s3_bucket_name = "bucketlog"
enable_logging = false
}
After
hcl
resource "aws_cloudtrail" "example" {
name = "trail-enabled"
s3_bucket_name = "bucketlog"
enable_logging = true
}