cloudposse / terraform-aws-waf

https://cloudposse.com/accelerate
Apache License 2.0
41 stars 58 forks source link

Ruleset version support #14

Open tsunamaru opened 2 years ago

tsunamaru commented 2 years ago

Describe the Feature

Add version support for AWS Managed Rules.

Use Case

Sometimes it's important to apply or keep specific version because of breaking changes from Amazon.

Describe Ideal Solution

Something like this, maybe?

managed_rule_group_statement_rules = [
    {
      name = "10-common"
      override_action = "count"
      priority = 10
      statement = {
        name          = "AWSManagedRulesCommonRuleSet"
        vendor_name   = "AWS"
        version = "Version_1.2"
        excluded_rule = []
      }
      visibility_config = {
        cloudwatch_metrics_enabled = false
        sampled_requests_enabled   = false
        metric_name                = "10-common-metric"
      }
    }
]

Alternatives Considered

None.

Additional Context

In AWS console, version can be changed in rule edit: image