Resource: aws_wafv2_regex_pattern_set

Provides an AWS WAFv2 Regex Pattern Set Resource

Example Usage

resource "aws_wafv2_regex_pattern_set" "example" {
  name        = "example"
  description = "Example regex pattern set"
  scope       = "REGIONAL"

  regular_expression {
    regex_string = "one"
  }

  regular_expression {
    regex_string = "two"
  }

  tags = {
    Tag1 = "Value1"
    Tag2 = "Value2"
  }
}

Argument Reference

This resource supports the following arguments:

Regular Expression

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 WAFv2 Regex Pattern Sets using ID/name/scope. For example:

import {
  to = aws_wafv2_regex_pattern_set.example
  id = "a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc/example/REGIONAL"
}

Using terraform import, import WAFv2 Regex Pattern Sets using ID/name/scope. For example:

% terraform import aws_wafv2_regex_pattern_set.example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc/example/REGIONAL