|
@@ -3,7 +3,7 @@ module "s3_logging_bucket" {
|
|
|
source = "../../thirdparty/terraform-aws-s3logging-bucket"
|
|
|
|
|
|
bucket_name = "xdr-cloudtrail-logs-${var.environment}-access-logs"
|
|
|
- lifecycle_rules = list(
|
|
|
+ lifecycle_rules = [
|
|
|
{
|
|
|
id = "expire-old-logs"
|
|
|
enabled = true
|
|
@@ -11,7 +11,8 @@ module "s3_logging_bucket" {
|
|
|
expiration = 30
|
|
|
noncurrent_version_expiration = 30
|
|
|
abort_incomplete_multipart_upload_days = 7
|
|
|
- })
|
|
|
+ }
|
|
|
+ ]
|
|
|
tags = merge(var.standard_tags, var.tags)
|
|
|
versioning_enabled = true
|
|
|
}
|
|
@@ -24,7 +25,7 @@ module "cloudtrail_logging_bucket" {
|
|
|
logging_bucket = module.s3_logging_bucket.s3_bucket_name
|
|
|
region = var.aws_region
|
|
|
tags = merge(var.standard_tags, var.tags)
|
|
|
- lifecycle_rules = list(
|
|
|
+ lifecycle_rules = [
|
|
|
{
|
|
|
id = "expire-old-logs"
|
|
|
enabled = true
|
|
@@ -32,7 +33,8 @@ module "cloudtrail_logging_bucket" {
|
|
|
expiration = 30
|
|
|
noncurrent_version_expiration = 30
|
|
|
abort_incomplete_multipart_upload_days = 7
|
|
|
- })
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
|
|
|
resource "aws_s3_bucket_notification" "on_new_object" {
|