cloudtrail.tf 1.0 KB

12345678910111213141516
  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_key_id = var.cloudtrail_key_arn
  9. log_group_name = "cloudtrail-local-account"
  10. retention_in_days = 7 # Days available in the local account cloudtrail logs. See the S3 bucket for retention there.
  11. # Uncomment to enable object level logging. If specifying individual buckets, be sure to end with a `/'
  12. # 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.
  13. # This is not a CIS requirement.
  14. #s3_object_level_buckets = [ "arn:${var.aws_partition}:s3:::" ]
  15. lambda_functions = [ "arn:${var.aws_partition}:lambda" ]
  16. }