File tree Expand file tree Collapse file tree
infrastructure/stacks/api-layer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ resource "aws_wafv2_web_acl" "api_gateway" {
4848 vendor_name = " AWS"
4949 name = " AWSManagedRulesCommonRuleSet"
5050
51- # Override NoUserAgent_Header to count only - APIM health checks send no User-Agent
51+ # Override NoUserAgent_HEADER to count only - APIM health checks send no User-Agent
5252 rule_action_override {
53- name = " NoUserAgent_Header "
53+ name = " NoUserAgent_HEADER "
5454 action_to_use {
5555 count {}
5656 }
Original file line number Diff line number Diff line change @@ -197,14 +197,14 @@ resource "aws_cloudwatch_metric_alarm" "waf_all_requests_high" {
197197 )
198198}
199199
200- # Alarm for counted requests (NoUserAgent_Header override)
201- # The CRS NoUserAgent_Header sub-rule is kept in COUNT to allow the API proxy healthcheck.
200+ # Alarm for counted requests (NoUserAgent_HEADER override)
201+ # The CRS NoUserAgent_HEADER sub-rule is kept in COUNT to allow the API proxy healthcheck.
202202# This alarm alerts if count spikes unexpectedly, which could indicate rule misconfiguration
203203# or unexpected traffic patterns hitting that override.
204204resource "aws_cloudwatch_metric_alarm" "waf_counted_requests_monitoring" {
205205 count = local. waf_enabled ? 1 : 0
206206 alarm_name = " WAF-CountedRequests-Monitoring-${ local . workspace } "
207- alarm_description = " Monitors counted requests - expected to be low volume (healthcheck NoUserAgent_Header override only)"
207+ alarm_description = " Monitors counted requests - expected to be low volume (healthcheck NoUserAgent_HEADER override only)"
208208 comparison_operator = " GreaterThanThreshold"
209209 evaluation_periods = 1
210210 metric_name = " CountedRequests"
@@ -227,7 +227,7 @@ resource "aws_cloudwatch_metric_alarm" "waf_counted_requests_monitoring" {
227227 Name = " WAF-CountedRequests-Monitoring"
228228 Severity = " low"
229229 Environment = var.environment
230- Purpose = " Monitor NoUserAgent_Header count override for healthcheck proxy"
230+ Purpose = " Monitor NoUserAgent_HEADER count override for healthcheck proxy"
231231 }
232232 )
233233}
You can’t perform that action at this time.
0 commit comments