We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7f3193 commit 66c4c52Copy full SHA for 66c4c52
infrastructure/modules/cloudfront/main.tf
@@ -98,10 +98,13 @@ resource "aws_cloudfront_distribution" "distribution_with_secondary_bucket" {
98
99
}
100
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
+ dynamic "logging_config" {
+ for_each = var.log_bucket_id != "" ? [1] : []
+ content {
+ bucket = var.log_bucket_id
105
+ # this might break it as path pattern is in format /pattern/
106
+ prefix = var.secondary_bucket_path_pattern
107
+ }
108
109
110
viewer_certificate {
0 commit comments