WAF Automation on AWS solution is developed using Terraform which automatically deploys a set of AWS WAF rules that filter common web-based attacks. Users can select from preconfigured protective features that define the rules included in an AWS WAF web access control list (web ACL). Once deployed, AWS WAF protects your Amazon CloudFront distributions or Application Load Balancers by inspecting web requests.
- An active AWS account.
- AWS Command Line Interface (AWS CLI) installed and configured with necessary permissions. For more information about this , refer this documentation.
- Terraform installed and configured. For more information about this , refer this documentation.
terraform init
terraform plan -var-file="testing.tfvars"
terraform apply -var-file="testing.tfvars"
Check out this APG Pattern for detailed deployment instructions: Deploy the Security Automations for AWS WAF solution by using Terraform
ActivateHttpFloodProtectionParam = yes - AWS Lambda log parser, yes - Amazon Athena log parser,yes - AWS WAF rate based rule
ActivateScannersProbesProtectionParam =yes - AWS Lambda log parser, yes - Amazon Athena log parser
ENDPOINT = ALB , cloudfront
Error: Error deleting WAFv2 IPSet: WAFOptimisticLockException: AWS WAF couldn’t save your changes because someone changed the resource after you started to edit it. Re-apply your changes.
Delete the IPsets manually and retry the terraform destroy command. Reference : hashicorp/terraform-provider-aws#21136
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.
Name | Version |
---|---|
aws | ~> 3.0 |
Name | Version |
---|---|
aws | ~> 3.0 |
random | n/a |
No modules.
Name | Description | Type | Default | Required |
---|---|---|---|---|
ActivateAWSManagedRulesParam | n/a | string |
"no" |
no |
ActivateBadBotProtectionParam | n/a | string |
"yes" |
no |
ActivateCrossSiteScriptingProtectionParam | n/a | string |
"yes" |
no |
ActivateHttpFloodProtectionParam | n/a | string |
"yes - AWS WAF rate based rule" |
no |
ActivateReputationListsProtectionParam | n/a | string |
"yes" |
no |
ActivateScannersProbesProtectionParam | n/a | string |
"" |
no |
ActivateSqlInjectionProtectionParam | n/a | string |
"yes" |
no |
AppAccessLogBucket | Application Access Log Bucket Name | string |
"myownbucket-tam" |
no |
BadBotProtectionActivated | n/a | string |
"yes" |
no |
DeliveryStreamName | Name of the Delivery stream value | string |
"terraform-kinesis-firehose-extended-s3-test-stream" |
no |
ENDPOINT | cloudfront or ALB | string |
"cloudFront" |
no |
ErrorThreshold | error threshold for Log Monitoring Settings | number |
50 |
no |
IPRetentionPeriod | n/a | string |
"no" |
no |
IPRetentionPeriodAllowedParam | IP Retention Settings allowed value | number |
-1 |
no |
IPRetentionPeriodDeniedParam | IP Retention Settings denied value | number |
-1 |
no |
KEEP_ORIGINAL_DATA | S3 original data | string |
"No" |
no |
KeyPrefix | Keyprefix values for the lambda source code | string |
"aws-waf-security-automations/v3.2.0" |
no |
LOG_LEVEL | Log level | string |
"INFO" |
no |
MetricsURL | Metrics URL | string |
"https://metrics.awssolutionsbuilder.com/generic" |
no |
ReputationListsProtectionActivated | n/a | string |
"yes" |
no |
RequestThreshold | request threshold for Log Monitoring Settings | number |
100 |
no |
SEND_ANONYMOUS_USAGE_DATA | Data collection parameter | string |
"yes" |
no |
SNSEmailParam | SNS notification value | string |
"" |
no |
ScannersProbesProtectionActivated | n/a | string |
"yes" |
no |
SendAnonymousUsageData | Data collection parameter | string |
"yes" |
no |
SolutionID | UserAgent id value | string |
"SO0006" |
no |
SourceBucket | Lambda source code bucket | string |
"solutions" |
no |
USER_AGENT_EXTRA | UserAgent | string |
"AwsSolution/SO0006/v3.2.0" |
no |
WAFBlockPeriod | block period for Log Monitoring Settings | number |
240 |
no |
app_access_logs_columns | n/a | map |
{ |
no |
cloudfront_app_access_logs_columns | n/a | map |
{ |
no |
sse_algorithm | sse_algorithm | string |
"aws:kms" |
no |
waf_access_logs_columns | n/a | map |
{ |
no |
No outputs.