Skip to content

Commit

Permalink
Fix/add missing regex comp (#438)
Browse files Browse the repository at this point in the history
* updated regex pattern to support newly added uris

* add page

* fix typo in resource name

* fix undo introduced typo

* try updating resource type to wafv1 where regex_pattern_strings is supported else will fallback on regular regex_string template

* reset staging state:disabled regex till the provider upgrade is merged

* attempt to fix waf limit exceeded error

* renamed rule

* fix undeclared resource name

* attempt to fix resource name mismatch

* add missing regex component to match path

* removed duplicated expression

* removed duplicate expression
  • Loading branch information
falila authored Jul 19, 2023
1 parent 9a5142a commit 923a0b7
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions aws/load_balancer/waf.tf
Original file line number Diff line number Diff line change
Expand Up @@ -276,30 +276,25 @@ resource "aws_wafv2_web_acl_logging_configuration" "firehose_waf_logs_forms" {
}



resource "aws_wafv2_regex_pattern_set" "valid_app_uri_paths" {
name = "valid_app_uri_paths"
scope = "REGIONAL"
description = "Regex to match the app valid urls"

regular_expression {
regex_string = "^\\/(?:en|fr)?\\/?(?:(admin|id|api|auth|signup|myforms|unsupported-browser|terms-of-use|404)(?:\\/[\\w-]+))?\\/?$"
}

regular_expression {
regex_string = "^\\/(?:en|fr)?\\/?(?:(form-builder|sla|unlock-publishing|terms-and-conditions|javascript-disabled)(?:\\/[\\w-]+))?\\/?$"
regex_string = "^\\/(?:en|fr)?\\/?(?:(admin|id|api|auth|signup|myforms|unsupported-browser|terms-of-use|404)(?:\\/[\\w-]+)*)?(?:\\/.*)?$"
}

regular_expression {
regex_string = "^\\/(?:en|fr)?\\/?(?:(form-builder|sla|unlock-publishing|terms-and-conditions|javascript-disabled)(?:\\/[\\w-]+))?\\/?$"
regex_string = "^\\/(?:en|fr)?\\/?(?:(form-builder|sla|unlock-publishing|terms-and-conditions|javascript-disabled)(?:\\/[\\w-]+)*)?(?:\\/.*)?$"
}

regular_expression {
regex_string = "^\\/(?:en|fr)?\\/?(?:(static|_next|img|favicon\\.ico)(?:\\/[\\w-]+))?\\/?$"
regex_string = "^\\/(?:en|fr)?\\/?(?:(static|_next|img|favicon\\.ico)(?:\\/[\\w-]+)*)?(?:\\/.*)?$"
}

regular_expression {
regex_string = "^\\/(?:en|fr)?\\/?(?:\\/[\\w-]+)?\\/?$"
regex_string = "^\\/(?:en|fr)?\\/?(?:\\/[\\w-]+)*)?(?:\\/.*)?$"
}
}

0 comments on commit 923a0b7

Please sign in to comment.