Skip to content

Commit

Permalink
waf: Fix waf_size_constraint_set docs (#32421)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Davis <sdavis@hashicorp.com>
  • Loading branch information
YakDriver and breathingdust authored Dec 6, 2023
1 parent 923b56c commit 242890d
Showing 1 changed file with 13 additions and 24 deletions.
37 changes: 13 additions & 24 deletions website/docs/r/waf_size_constraint_set.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ subcategory: "WAF Classic"
layout: "aws"
page_title: "AWS: aws_waf_size_constraint_set"
description: |-
Provides a AWS WAF Size Constraint Set resource.
The `aws_waf_size_constraint_set` resource provides an AWS WAF Size Constraint Set.
---

# Resource: aws_waf_size_constraint_set

Provides a WAF Size Constraint Set Resource
Use the `aws_waf_size_constraint_set` resource to manage WAF size constraint sets.

## Example Usage

Expand All @@ -32,45 +32,34 @@ resource "aws_waf_size_constraint_set" "size_constraint_set" {

This resource supports the following arguments:

* `name` - (Required) The name or description of the Size Constraint Set.
* `size_constraints` - (Optional) Specifies the parts of web requests that you want to inspect the size of.
* `name` - (Required) Name or description of the Size Constraint Set.
* `size_constraints` - (Optional) Parts of web requests that you want to inspect the size of.

## Nested Blocks

### `size_constraints`

#### Arguments

* `field_to_match` - (Required) Specifies where in a web request to look for the size constraint.
* `comparison_operator` - (Required) The type of comparison you want to perform.
e.g., `EQ`, `NE`, `LT`, `GT`.
See [docs](https://docs.aws.amazon.com/waf/latest/APIReference/API_wafRegional_SizeConstraint.html) for all supported values.
* `size` - (Required) The size in bytes that you want to compare against the size of the specified `field_to_match`.
Valid values are between 0 - 21474836480 bytes (0 - 20 GB).
* `text_transformation` - (Required) Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF.
If you specify a transformation, AWS WAF performs the transformation on `field_to_match` before inspecting a request for a match.
e.g., `CMD_LINE`, `HTML_ENTITY_DECODE` or `NONE`.
See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_SizeConstraint.html#WAF-Type-SizeConstraint-TextTransformation)
for all supported values.
**Note:** if you choose `BODY` as `type`, you must choose `NONE` because CloudFront forwards only the first 8192 bytes for inspection.
* `field_to_match` - (Required) Parameter that specifies where in a web request to look for the size constraint.
* `comparison_operator` - (Required) Type of comparison you want to perform, such as `EQ`, `NE`, `LT`, or `GT`. Please refer to the [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_wafRegional_SizeConstraint.html) for a complete list of supported values.
* `size` - (Required) Size in bytes that you want to compare against the size of the specified `field_to_match`. Valid values for `size` are between 0 and 21474836480 bytes (0 and 20 GB).
* `text_transformation` - (Required) Parameter is used to eliminate unusual formatting that attackers may use in web requests to bypass AWS WAF. When a transformation is specified, AWS WAF performs the transformation on the `field_to_match` before inspecting the request for a match. Some examples of supported transformations are `CMD_LINE`, `HTML_ENTITY_DECODE`, and `NONE`. You can find a complete list of supported values in the [AWS WAF API Reference](http://docs.aws.amazon.com/waf/latest/APIReference/API_SizeConstraint.html#WAF-Type-SizeConstraint-TextTransformation).
**Note:** If you choose `BODY` as the `type`, you must also choose `NONE` because CloudFront only forwards the first 8192 bytes for inspection.

### `field_to_match`

#### Arguments

* `data` - (Optional) When `type` is `HEADER`, enter the name of the header that you want to search, e.g., `User-Agent` or `Referer`.
If `type` is any other value, omit this field.
* `type` - (Required) The part of the web request that you want AWS WAF to search for a specified string.
e.g., `HEADER`, `METHOD` or `BODY`.
See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_FieldToMatch.html)
for all supported values.
* `data` - (Optional) When the `type` is `HEADER`, specify the name of the header that you want to search using the `data` field, for example, `User-Agent` or `Referer`. If the `type` is any other value, you can omit this field.
* `type` - (Required) Part of the web request that you want AWS WAF to search for a specified string. For example, `HEADER`, `METHOD`, or `BODY`. See the [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_FieldToMatch.html) for all supported values.

## Attribute Reference

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

* `id` - The ID of the WAF Size Constraint Set.
* `arn` - Amazon Resource Name (ARN)
* `id` - ID of the WAF Size Constraint Set.
* `arn` - Amazon Resource Name (ARN).

## Import

Expand Down

0 comments on commit 242890d

Please sign in to comment.