File tree 2 files changed +13
-5
lines changed
2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -110,11 +110,13 @@ resource "aws_s3_bucket" "bucket" {
110
110
}
111
111
}
112
112
113
- # TODO
114
- # logging {
115
- # target_bucket = ""
116
- # target_prefix = ""
117
- # }
113
+ dynamic "logging" {
114
+ for_each = var. logging_bucket == null ? [] : [var . logging_bucket ]
115
+ content {
116
+ target_bucket = var. logging_bucket . name
117
+ target_prefix = var. logging_bucket . prefix
118
+ }
119
+ }
118
120
119
121
server_side_encryption_configuration {
120
122
rule {
Original file line number Diff line number Diff line change @@ -71,6 +71,12 @@ variable "transfer_acceleration" {
71
71
default = false
72
72
}
73
73
74
+ variable "logging_bucket" {
75
+ type = object ({ name = string , prefix = string })
76
+ description = " Log bucket name and prefix to enable logs for this bucket"
77
+ default = null
78
+ }
79
+
74
80
variable "public_access_block" {
75
81
type = bool
76
82
default = true
You can’t perform that action at this time.
0 commit comments