Resource: aws_wafregional_rate_based_rule

Provides a WAF Rate Based Rule Resource

Example Usage

resource "aws_wafregional_ipset" "ipset" {
  name = "tfIPSet"

  ip_set_descriptor {
    type  = "IPV4"
    value = "192.0.7.0/24"
  }
}

resource "aws_wafregional_rate_based_rule" "wafrule" {
  depends_on  = [aws_wafregional_ipset.ipset]
  name        = "tfWAFRule"
  metric_name = "tfWAFRule"

  rate_key   = "IP"
  rate_limit = 100

  predicate {
    data_id = aws_wafregional_ipset.ipset.id
    negated = false
    type    = "IPMatch"
  }
}

Argument Reference

This resource supports the following arguments:

Nested Blocks

predicate

See the WAF Documentation for more information.

Arguments

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import WAF Regional Rate Based Rule using the id. For example:

import {
  to = aws_wafregional_rate_based_rule.wafrule
  id = "a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc"
}

Using terraform import, import WAF Regional Rate Based Rule using the id. For example:

% terraform import aws_wafregional_rate_based_rule.wafrule a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc