This Terraform module provides a preconfigured solution for setting up AWS WAF in your AWS account. AWS WAF is a web application firewall that helps protect your web applications from common web exploits that could affect application availability, compromise security, or consume excessive resources. With this Terraform module, you can easily and efficiently set up and manage AWS WAF for your Load Balancer, API Gateway, or Cognito User Pool.
Name | Description | Type | Default | Required |
---|---|---|---|---|
name | Friendly name of the rule. | string |
n/a | yes |
rate_limit_positional_constraint | The area within the portion of a web request that you want AWS WAF to search for rate limiting headers. Valid values: EXACTLY, STARTS_WITH, ENDS_WITH, CONTAINS, and CONTAINS_WORD. The default value is EXACTLY. | string |
"STARTS_WITH" |
no |
rate_limit_search_string | String value that you want AWS WAF to search for. AWS WAF searches only in the part of web requests that you designate for inspection in field_to_match. The maximum length of the value is 50 bytes. | string |
"/api" |
no |
resource_arn | The Amazon Resource Name (ARN) of the resource to associate with the web ACL. This must be an ARN of an Application Load Balancer, an Amazon API Gateway stage, or an Amazon Cognito User Pool. | string |
n/a | yes |
tags | Tags to add to the Resources. | map(any) |
{} |
no |
No outputs.
Name | Version |
---|---|
aws | >= 5.0, < 6.0 |
- resource.aws_wafv2_ip_set.ip_blocking (main.tf#291)
- resource.aws_wafv2_web_acl.main (main.tf#12)
- resource.aws_wafv2_web_acl_association.main (main.tf#309)
module "example" {
source = "../../"
name = "waf"
resource_arn = "arn:aws:elasticloadbalancing:eu-central-1:123456789012:loadbalancer/app/my-load-balancer/1234567890123456"
}