Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support scope-down statements #33

Closed
mikstew opened this issue Apr 28, 2023 · 1 comment
Closed

Support scope-down statements #33

mikstew opened this issue Apr 28, 2023 · 1 comment

Comments

@mikstew
Copy link

mikstew commented Apr 28, 2023

Describe the Feature

Update the module so that is supports scope-down statements for managed rule groups and rate-based rules.

https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-scope-down-statements.html

Expected Behavior

Accept scope_down_statement within rate_based_statement_rules and managed_rule_group_statement_rules, like the following:

module "waf" {
  source = "../.."
  
  rate_based_statement_rules = [
    {
      name     = "rule-40"
      action   = "block"
      priority = 40

      statement = {
        limit              = 100
        aggregate_key_type = "IP"
      }

      scope_down_statement = {
        matches = {
          request_components = {
            uri_path = "/path"
          }
        }
      }

      visibility_config = {
        cloudwatch_metrics_enabled = false
        sampled_requests_enabled   = false
        metric_name                = "rule-40-metric"
      }
    }
  ]
}

Use Case

We would like the module to support more WAFv2 functionality so we can continue to use it.

Describe Ideal Solution

It would be great if this module supported scope-down statements.

Alternatives Considered

No response

Additional Context

No response

@mikstew
Copy link
Author

mikstew commented May 11, 2023

I was able to create an aws_wafv2_rule_group with a scope-down statement outside of this module and assign it to the web ACL using rule_group_reference_statement_rules. It may be nice for the module to support scope-down statements directly in the rate_based_statement_rules, but the work around is more than adequate so I will close this request. Thanks!

@mikstew mikstew closed this as completed May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant