File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -19,4 +19,5 @@ module "cloudfront-distribution-lg" {
1919 secondary_bucket_domain_name = module. ndr-document-pending-review-store . bucket_regional_domain_name
2020 secondary_bucket_id = module. ndr-document-pending-review-store . bucket_id
2121 secondary_bucket_path_pattern = " /review/*"
22+ log_bucket_id = local. access_logs_bucket_id
2223}
Original file line number Diff line number Diff line change @@ -98,6 +98,12 @@ resource "aws_cloudfront_distribution" "distribution_with_secondary_bucket" {
9898
9999 }
100100
101+ logging_config {
102+ bucket = var. log_bucket_id
103+ # this might break it as path pattern is in format /pattern/
104+ prefix = var. secondary_bucket_path_pattern
105+ }
106+
101107 viewer_certificate {
102108 cloudfront_default_certificate = true
103109 }
Original file line number Diff line number Diff line change @@ -39,3 +39,8 @@ variable "secondary_bucket_path_pattern" {
3939 type = string
4040}
4141
42+ variable "log_bucket_id" {
43+ description = " The bucket ID to send access logs to"
44+ type = string
45+ }
46+
You can’t perform that action at this time.
0 commit comments