cloudtrail.tf 1.1 KB

1234567891011121314151617
  1. # Sets up a cloudtrail that keeps 7 days locally in cloudwatch logs and also sends everything to a bucket in C2
  2. module "cloudtrail-logging" {
  3. source = "../../thirdparty/terraform-aws-cloudtrail-logging"
  4. region = var.aws_region
  5. cloudtrail_name = "xdr-centralized-cloudtrail"
  6. cloudtrail_bucket = "xdr-cloudtrail-logs-${local.logging_environment}"
  7. iam_path = "/aws_services/"
  8. # kms broken in us-gov-east-1: Reenable after 11/15/2021
  9. kms_key_id = var.cloudtrail_key_arn
  10. log_group_name = var.log_group_name
  11. retention_in_days = 7 # Days available in the local account cloudtrail logs. See the S3 bucket for retention there.
  12. # Uncomment to enable object level logging. If specifying individual buckets, be sure to end with a `/'
  13. # This is not enabled by default due to the recursive nature: A log is written, splunk reads it, which results in a log being written.
  14. # This is not a CIS requirement.
  15. #s3_object_level_buckets = [ "arn:${var.aws_partition}:s3:::" ]
  16. lambda_functions = [ "arn:${var.aws_partition}:lambda" ]
  17. }