Skip to content

Commit

Permalink
fix: WAF rule for maintenance mode not having proper scope (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
craigzour authored Dec 11, 2023
1 parent 98cbf18 commit f90bddc
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions aws/load_balancer/waf.tf
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ resource "aws_wafv2_web_acl" "forms_acl" {
block {}
}


statement {
not_statement {
statement {
Expand Down Expand Up @@ -232,8 +231,6 @@ resource "aws_wafv2_web_acl" "forms_acl" {
sampled_requests_enabled = false
}
}


}

#
Expand Down Expand Up @@ -329,7 +326,7 @@ resource "aws_wafv2_web_acl" "forms_maintenance_mode_acl" {
}

text_transformation {
priority = 0
priority = 1
type = "NONE"
}
}
Expand All @@ -344,12 +341,12 @@ resource "aws_wafv2_web_acl" "forms_maintenance_mode_acl" {
}

text_transformation {
priority = 0
priority = 1
type = "COMPRESS_WHITE_SPACE"
}

text_transformation {
priority = 1
priority = 2
type = "LOWERCASE"
}
}
Expand Down Expand Up @@ -378,7 +375,7 @@ resource "aws_wafv2_web_acl" "forms_maintenance_mode_acl" {

resource "aws_wafv2_regex_pattern_set" "valid_maintenance_mode_uri_paths" {
name = "valid_maintenance_page_uri_paths"
scope = "REGIONAL"
scope = "CLOUDFRONT"
description = "Regex to match the maintenance page valid URIs"

regular_expression {
Expand Down

0 comments on commit f90bddc

Please sign in to comment.