Skip to content

Commit

Permalink
feat: Cloudtrail logging for s3 events (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
shivawandb authored Jan 30, 2025
1 parent f62ee75 commit 7a0ad6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/cloudtrail/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# S3 Bucket for CloudTrail logs
resource "aws_s3_bucket" "cloudtrail_logs" {
bucket = var.cloudtrail_bucket_name
bucket = "${var.namespace}-${var.cloudtrail_bucket_name}"
force_destroy = var.force_destroy

tags = merge(var.tags, { Name = "CloudTrailLogs" })
Expand Down
5 changes: 5 additions & 0 deletions modules/cloudtrail/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,8 @@ variable "tags" {
Environment = "production"
}
}

variable "namespace" {
type = string
description = "(Required) The name prefix for all resources created."
}

0 comments on commit 7a0ad6d

Please sign in to comment.