Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 0 additions & 99 deletions terraform/common/waf/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -183,25 +183,6 @@ resource "aws_wafv2_web_acl" "this" {
}
}

rule {
name = "Rate-Limit-Rule"
priority = 20
action {
block {}
}
statement {
rate_based_statement {
limit = var.request_threshold
aggregate_key_type = "IP"
}
}
visibility_config {
cloudwatch_metrics_enabled = true
metric_name = "rate-limit-rule"
sampled_requests_enabled = true
}
}

# AWS Managed Core Rule Set
rule {
name = "AWS-Managed-Core-Rule-Set"
Expand All @@ -222,86 +203,6 @@ resource "aws_wafv2_web_acl" "this" {
}
}

# Scanners & Probes Protection
rule {
name = "AWS-Managed-Known-Bad-Inputs-Rule-Set"
priority = 40
override_action {
none {}
}
statement {
managed_rule_group_statement {
vendor_name = "AWS"
name = "AWSManagedRulesKnownBadInputsRuleSet"
}
}
visibility_config {
cloudwatch_metrics_enabled = true
metric_name = "aws-managed-bad-inputs"
sampled_requests_enabled = true
}
}

# Reputation Lists Protection
rule {
name = "AWS-Managed-Amazon-IP-Reputation-List"
priority = 50
override_action {
none {}
}
statement {
managed_rule_group_statement {
vendor_name = "AWS"
name = "AWSManagedRulesAmazonIpReputationList"
}
}
visibility_config {
cloudwatch_metrics_enabled = true
metric_name = "aws-managed-ip-rep"
sampled_requests_enabled = true
}
}

# Anonymous IP list
rule {
name = "AWS-Managed-Anonymous-IP-List"
priority = 70
override_action {
none {}
}
statement {
managed_rule_group_statement {
vendor_name = "AWS"
name = "AWSManagedRulesAnonymousIpList"
}
}
visibility_config {
cloudwatch_metrics_enabled = true
metric_name = "aws-managed-anonymous-ip"
sampled_requests_enabled = true
}
}

# SQL database
rule {
name = "AWS-Managed-SQLi-Rule-Set"
priority = 80
override_action {
none {}
}
statement {
managed_rule_group_statement {
vendor_name = "AWS"
name = "AWSManagedRulesSQLiRuleSet"
}
}
visibility_config {
cloudwatch_metrics_enabled = true
metric_name = "aws-managed-sql-db"
sampled_requests_enabled = true
}
}

visibility_config {
cloudwatch_metrics_enabled = true
metric_name = "${var.project_name}-web-acl"
Expand Down