Skip to content

Commit

Permalink
ignore rule
Browse files Browse the repository at this point in the history
  • Loading branch information
theseanything committed Jan 27, 2025
1 parent 4f3c2b0 commit 3d76e10
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions terraform/deployments/govuk-publishing-infrastructure/wafs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ resource "aws_wafv2_web_acl" "default" {
allow {}
}

lifecycle {
ignore_changes = [
rule
]
}

rule {
name = "x-always-block_web_acl_rule"
priority = 1
Expand Down Expand Up @@ -132,6 +138,12 @@ resource "aws_wafv2_web_acl" "backend_public" {
allow {}
}

lifecycle {
ignore_changes = [
rule
]
}

# this rule matches any request that contains the header X-Always-Block: true
# we use it as a simple sanity check / acceptance test from smokey to ensure that
# the waf is enabled and processing requests
Expand Down Expand Up @@ -345,6 +357,12 @@ resource "aws_wafv2_web_acl" "bouncer_public" {
allow {}
}

lifecycle {
ignore_changes = [
rule
]
}

# this rule matches any request that contains the header X-Always-Block: true
# we use it as a simple sanity check / acceptance test from smokey to ensure that
# the waf is enabled and processing requests
Expand Down Expand Up @@ -522,6 +540,13 @@ resource "aws_wafv2_web_acl" "cache_public" {
allow {}
}

lifecycle {
ignore_changes = [
rule,
custom_response_body
]
}

visibility_config {
cloudwatch_metrics_enabled = true
metric_name = "cache-public-web-acl"
Expand Down

0 comments on commit 3d76e10

Please sign in to comment.