AWS WAF Regional Regional Regex Pattern Set

This page shows how to write Terraform and CloudFormation for AWS WAF Regional Regional Regex Pattern Set and write them securely.

aws_wafregional_regex_pattern_set (Terraform)

The Regional Regex Pattern Set in AWS WAF Regional can be configured in Terraform with the resource name aws_wafregional_regex_pattern_set. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L7
resource "aws_wafregional_regex_pattern_set" "this" {
  name                  = var.name
  regex_pattern_strings = var.regex_pattern_strings
}

body_regex.tf#L1
resource "aws_wafregional_regex_pattern_set" "body" {
    name                  = format("%s-body-regex", var.waf_name)
    regex_pattern_strings = var.body_regex
}

resource "aws_wafregional_regex_match_set" "regex_body" {

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides a WAF Regional Regex Pattern Set Resource

AWS::WAFRegional::RegexPatternSet (CloudFormation)

The RegexPatternSet in WAFRegional can be configured in CloudFormation with the resource name AWS::WAFRegional::RegexPatternSet. The following sections describe 3 examples of how to use the resource and its parameters.

Example Usage from GitHub

awsResouceIconMatches.json#L531
        "resourceType": "AWS::WAFRegional::RegexPatternSet",
        "filePath": null
      },
      {
        "resourceType": "AWS::WAFRegional::WebACLAssociation",
        "filePath": null
template.json#L507
    "AWS::WAFRegional::RegexPatternSet": {
      "Type": "AWS::WAFRegional::RegexPatternSet",
      "Properties": {}
    },
    "AWS::MediaPackage::PackagingGroup": {
      "Type": "AWS::MediaPackage::PackagingGroup",
WAFRegionalRegexPatternSetSpecification.json#L3
    "AWS::WAFRegional::RegexPatternSet": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-regexpatternset.html",
      "Properties": {
        "RegexPatternStrings": {
          "PrimitiveItemType": "String",
          "Type": "List",

Parameters

Explanation in CloudFormation Registry

The RegexPatternSet specifies the regular expression (regex) pattern that you want AWS WAF to search for, such as B[a@]dB[o0]t. You can then configure AWS WAF to reject those requests.

Note that you can only create regex pattern sets using a AWS CloudFormation template. To add the regex pattern sets created through AWS CloudFormation to a RegexMatchSet, use the AWS WAF console, API, or command line interface (CLI). For more information, see UpdateRegexMatchSet.

Frequently asked questions

What is AWS WAF Regional Regional Regex Pattern Set?

AWS WAF Regional Regional Regex Pattern Set is a resource for WAF Regional of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS WAF Regional Regional Regex Pattern Set?

For Terraform, the niveklabs/aws and msfidelis/awswaf-production-automation source code examples are useful. See the Terraform Example section for further details.

For CloudFormation, the pistazie/cdk-dia, mhlabs/aws-icons-directory and claudiacauli/CloudFORMAL source code examples are useful. See the CloudFormation Example section for further details.