Terraform module to create and manage AWS WAFv2 Web ACLs and resource associations
- Logging Configuration Guide - Comprehensive guide for WAF logging configuration (CloudWatch Logs, S3, and more)
| Name | Version |
|---|---|
| terraform | >= 1.0 |
| aws | >= 6.0.0 |
No providers.
| Name | Source | Version |
|---|---|---|
| association | ./modules/associate-regional | n/a |
| web_acl | ./modules/web-acl | n/a |
No resources.
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| alarm_sns_topic_arn | SNS topic ARN for WAF alarms | string |
null |
no |
| alarm_threshold | Threshold for WAF rule alarms | number |
10 |
no |
| custom_response_bodies | Custom response bodies for WAF rules | map(object({ |
{} |
no |
| default_action | Default action for the Web ACL (allow or block) | string |
"allow" |
no |
| default_managed_rule_sets | Enable/disable default managed rule sets | object({ |
{} |
no |
| default_rules | Enable/disable default security rules | object({ |
{} |
no |
| description | Description for the Web ACL | string |
null |
no |
| enable_monitoring | Enable CloudWatch monitoring (alarms + dashboard) for all rules | bool |
false |
no |
| ip_sets | IP sets that can be referenced in rules | map(object({ |
{} |
no |
| logging | Logging configuration for the Web ACL | object({ |
{ |
no |
| managed_rule_sets | AWS managed rule sets to include | list(object({ |
[] |
no |
| name_prefix | Name prefix for the Web ACL | string |
n/a | yes |
| resource_arns | List of resource ARNs to associate with the Web ACL | list(string) |
[] |
no |
| rules | WAF rules to apply (in priority order) | list(object({ |
[] |
no |
| scope | Scope of the Web ACL (REGIONAL or CLOUDFRONT) | string |
"REGIONAL" |
no |
| tags | Tags to apply to resources | map(string) |
{} |
no |
| Name | Description |
|---|---|
| associated_resources | List of associated resource ARNs |
| association_ids | Map of resource ARN to association ID |
| dashboard_url | CloudWatch dashboard URL |
| ip_set_arns | Map of IP set names to their ARNs |
| rule_alarms | WAF CloudWatch alarms |
| web_acl_arn | ARN of the Web ACL |
| web_acl_id | ID of the Web ACL |
| web_acl_name | Name of the Web ACL |