From e3796e7d82170a5c4eeba79302f575a2acdc2c6b Mon Sep 17 00:00:00 2001 From: Himanshu Ahirwar Date: Thu, 9 Nov 2023 20:55:08 +0530 Subject: [PATCH] feat: s3_key_prefix attribute for cloudtrail --- main.tf | 1 + variables.tf | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/main.tf b/main.tf index 66e570b..dd8bf1e 100644 --- a/main.tf +++ b/main.tf @@ -27,6 +27,7 @@ resource "aws_cloudtrail" "default" { name = module.labels.id enable_logging = var.enable_logging s3_bucket_name = var.s3_bucket_name + s3_key_prefix = var.s3_key_prefix enable_log_file_validation = var.enable_log_file_validation is_multi_region_trail = var.is_multi_region_trail include_global_service_events = var.include_global_service_events diff --git a/variables.tf b/variables.tf index bb2dbf6..f305dcf 100644 --- a/variables.tf +++ b/variables.tf @@ -80,6 +80,12 @@ variable "s3_bucket_name" { description = "S3 bucket name for CloudTrail log." } +variable "s3_key_prefix" { + type = string + default = "" + description = "(Optional) S3 key prefix that follows the name of the bucket you have designated for log file delivery." +} + variable "cloud_watch_logs_role_arn" { type = string default = ""