Skip to content

Commit d386679

Browse files
committed
Merge branch 'main' into v1.0.6
2 parents 91384ea + 592556c commit d386679

File tree

2 files changed

+81
-81
lines changed

2 files changed

+81
-81
lines changed

modules/cloudfront-logs/lambda/yarn.lock

+6-6
Original file line numberDiff line numberDiff line change
@@ -2679,14 +2679,14 @@ sax@>=0.6.0:
26792679
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
26802680

26812681
semver@^6.3.0:
2682-
version "6.3.0"
2683-
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
2684-
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
2682+
version "6.3.1"
2683+
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
2684+
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
26852685

26862686
semver@^7.0.0, semver@^7.3.7, semver@^7.3.8:
2687-
version "7.5.2"
2688-
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb"
2689-
integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==
2687+
version "7.5.4"
2688+
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
2689+
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
26902690
dependencies:
26912691
lru-cache "^6.0.0"
26922692

modules/opennext-cloudfront/waf.tf

+75-75
Original file line numberDiff line numberDiff line change
@@ -121,78 +121,78 @@ resource "aws_wafv2_web_acl" "cloudfront_waf" {
121121
}
122122
}
123123

124-
#resource "aws_wafv2_web_acl_logging_configuration" "waf_logging" {
125-
# count = var.waf_logging_configuration == null || try(aws_wafv2_web_acl.cloudfront_waf[0], null) == null ? 0 : 1
126-
#
127-
# resource_arn = aws_wafv2_web_acl.cloudfront_waf[0].arn
128-
# log_destination_configs = var.waf_logging_configuration.log_destination_configs
129-
#
130-
# dynamic "logging_filter" {
131-
# for_each = var.waf_logging_configuration.logging_filter != null ? [true] : []
132-
#
133-
# content {
134-
# default_behavior = var.waf_logging_configuration.logging_filter.default_behavior
135-
#
136-
# dynamic "filter" {
137-
# for_each = toset(var.waf_logging_configuration.logging_filter.filter)
138-
#
139-
# content {
140-
# behavior = filter.value.behavior
141-
# requirement = filter.value.requirement
142-
#
143-
# dynamic "condition" {
144-
# for_each = filter.value.action_condition != null ? toset(filter.value.action_condition) : []
145-
#
146-
# content {
147-
# action_condition {
148-
# action = condition.value.action
149-
# }
150-
# }
151-
# }
152-
#
153-
# dynamic "condition" {
154-
# for_each = filter.value.label_name_condition != null ? toset(filter.label_name_condition) : []
155-
#
156-
# content {
157-
# label_name_condition {
158-
# label_name = condition.value.label_name
159-
# }
160-
# }
161-
# }
162-
# }
163-
# }
164-
# }
165-
# }
166-
#
167-
# dynamic "redacted_fields" {
168-
# for_each = var.waf_logging_configuration.redacted_fields == null ? toset(var.waf_logging_configuration.redacted_fields) : []
169-
#
170-
# content {
171-
# dynamic "method" {
172-
# for_each = redacted_fields.value.method == true ? [true] : []
173-
#
174-
# content {}
175-
# }
176-
#
177-
# dynamic "query_string" {
178-
# for_each = redacted_fields.value.query_string == true ? [true] : []
179-
#
180-
# content {}
181-
# }
182-
#
183-
# dynamic "single_header" {
184-
# for_each = redacted_fields.value.single_header != null ? [true] : []
185-
#
186-
# content {
187-
# name = redacted_fields.value.single_header.name
188-
# }
189-
# }
190-
#
191-
# dynamic "uri_path" {
192-
# for_each = redacted_fields.value.uri_path == true ? [true] : []
193-
#
194-
# content {}
195-
# }
196-
# }
197-
# }
198-
#}
124+
resource "aws_wafv2_web_acl_logging_configuration" "waf_logging" {
125+
count = var.waf_logging_configuration == null || var.custom_waf != null ? 0 : 1
126+
127+
resource_arn = aws_wafv2_web_acl.cloudfront_waf[0].arn
128+
log_destination_configs = var.waf_logging_configuration.log_destination_configs
129+
130+
dynamic "logging_filter" {
131+
for_each = var.waf_logging_configuration.logging_filter != null ? [true] : []
132+
133+
content {
134+
default_behavior = var.waf_logging_configuration.logging_filter.default_behavior
135+
136+
dynamic "filter" {
137+
for_each = toset(var.waf_logging_configuration.logging_filter.filter)
138+
139+
content {
140+
behavior = filter.value.behavior
141+
requirement = filter.value.requirement
142+
143+
dynamic "condition" {
144+
for_each = filter.value.action_condition != null ? toset(filter.value.action_condition) : []
145+
146+
content {
147+
action_condition {
148+
action = condition.value.action
149+
}
150+
}
151+
}
152+
153+
dynamic "condition" {
154+
for_each = filter.value.label_name_condition != null ? toset(filter.label_name_condition) : []
155+
156+
content {
157+
label_name_condition {
158+
label_name = condition.value.label_name
159+
}
160+
}
161+
}
162+
}
163+
}
164+
}
165+
}
166+
167+
dynamic "redacted_fields" {
168+
for_each = var.waf_logging_configuration.redacted_fields == null ? toset(var.waf_logging_configuration.redacted_fields) : []
169+
170+
content {
171+
dynamic "method" {
172+
for_each = redacted_fields.value.method == true ? [true] : []
173+
174+
content {}
175+
}
176+
177+
dynamic "query_string" {
178+
for_each = redacted_fields.value.query_string == true ? [true] : []
179+
180+
content {}
181+
}
182+
183+
dynamic "single_header" {
184+
for_each = redacted_fields.value.single_header != null ? [true] : []
185+
186+
content {
187+
name = redacted_fields.value.single_header.name
188+
}
189+
}
190+
191+
dynamic "uri_path" {
192+
for_each = redacted_fields.value.uri_path == true ? [true] : []
193+
194+
content {}
195+
}
196+
}
197+
}
198+
}

0 commit comments

Comments
 (0)