Skip to content

Commit

Permalink
Merge branch 'main' into v1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
andylamp committed Jan 26, 2024
2 parents 91384ea + 592556c commit d386679
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 81 deletions.
12 changes: 6 additions & 6 deletions modules/cloudfront-logs/lambda/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2679,14 +2679,14 @@ sax@>=0.6.0:
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==

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

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

Expand Down
150 changes: 75 additions & 75 deletions modules/opennext-cloudfront/waf.tf
Original file line number Diff line number Diff line change
Expand Up @@ -121,78 +121,78 @@ resource "aws_wafv2_web_acl" "cloudfront_waf" {
}
}

#resource "aws_wafv2_web_acl_logging_configuration" "waf_logging" {
# count = var.waf_logging_configuration == null || try(aws_wafv2_web_acl.cloudfront_waf[0], null) == null ? 0 : 1
#
# resource_arn = aws_wafv2_web_acl.cloudfront_waf[0].arn
# log_destination_configs = var.waf_logging_configuration.log_destination_configs
#
# dynamic "logging_filter" {
# for_each = var.waf_logging_configuration.logging_filter != null ? [true] : []
#
# content {
# default_behavior = var.waf_logging_configuration.logging_filter.default_behavior
#
# dynamic "filter" {
# for_each = toset(var.waf_logging_configuration.logging_filter.filter)
#
# content {
# behavior = filter.value.behavior
# requirement = filter.value.requirement
#
# dynamic "condition" {
# for_each = filter.value.action_condition != null ? toset(filter.value.action_condition) : []
#
# content {
# action_condition {
# action = condition.value.action
# }
# }
# }
#
# dynamic "condition" {
# for_each = filter.value.label_name_condition != null ? toset(filter.label_name_condition) : []
#
# content {
# label_name_condition {
# label_name = condition.value.label_name
# }
# }
# }
# }
# }
# }
# }
#
# dynamic "redacted_fields" {
# for_each = var.waf_logging_configuration.redacted_fields == null ? toset(var.waf_logging_configuration.redacted_fields) : []
#
# content {
# dynamic "method" {
# for_each = redacted_fields.value.method == true ? [true] : []
#
# content {}
# }
#
# dynamic "query_string" {
# for_each = redacted_fields.value.query_string == true ? [true] : []
#
# content {}
# }
#
# dynamic "single_header" {
# for_each = redacted_fields.value.single_header != null ? [true] : []
#
# content {
# name = redacted_fields.value.single_header.name
# }
# }
#
# dynamic "uri_path" {
# for_each = redacted_fields.value.uri_path == true ? [true] : []
#
# content {}
# }
# }
# }
#}
resource "aws_wafv2_web_acl_logging_configuration" "waf_logging" {
count = var.waf_logging_configuration == null || var.custom_waf != null ? 0 : 1

resource_arn = aws_wafv2_web_acl.cloudfront_waf[0].arn
log_destination_configs = var.waf_logging_configuration.log_destination_configs

dynamic "logging_filter" {
for_each = var.waf_logging_configuration.logging_filter != null ? [true] : []

content {
default_behavior = var.waf_logging_configuration.logging_filter.default_behavior

dynamic "filter" {
for_each = toset(var.waf_logging_configuration.logging_filter.filter)

content {
behavior = filter.value.behavior
requirement = filter.value.requirement

dynamic "condition" {
for_each = filter.value.action_condition != null ? toset(filter.value.action_condition) : []

content {
action_condition {
action = condition.value.action
}
}
}

dynamic "condition" {
for_each = filter.value.label_name_condition != null ? toset(filter.label_name_condition) : []

content {
label_name_condition {
label_name = condition.value.label_name
}
}
}
}
}
}
}

dynamic "redacted_fields" {
for_each = var.waf_logging_configuration.redacted_fields == null ? toset(var.waf_logging_configuration.redacted_fields) : []

content {
dynamic "method" {
for_each = redacted_fields.value.method == true ? [true] : []

content {}
}

dynamic "query_string" {
for_each = redacted_fields.value.query_string == true ? [true] : []

content {}
}

dynamic "single_header" {
for_each = redacted_fields.value.single_header != null ? [true] : []

content {
name = redacted_fields.value.single_header.name
}
}

dynamic "uri_path" {
for_each = redacted_fields.value.uri_path == true ? [true] : []

content {}
}
}
}
}

0 comments on commit d386679

Please sign in to comment.