@@ -183,25 +183,6 @@ resource "aws_wafv2_web_acl" "this" {
183183 }
184184 }
185185
186- rule {
187- name = " Rate-Limit-Rule"
188- priority = 20
189- action {
190- block {}
191- }
192- statement {
193- rate_based_statement {
194- limit = var. request_threshold
195- aggregate_key_type = " IP"
196- }
197- }
198- visibility_config {
199- cloudwatch_metrics_enabled = true
200- metric_name = " rate-limit-rule"
201- sampled_requests_enabled = true
202- }
203- }
204-
205186 # AWS Managed Core Rule Set
206187 rule {
207188 name = " AWS-Managed-Core-Rule-Set"
@@ -222,86 +203,6 @@ resource "aws_wafv2_web_acl" "this" {
222203 }
223204 }
224205
225- # Scanners & Probes Protection
226- rule {
227- name = " AWS-Managed-Known-Bad-Inputs-Rule-Set"
228- priority = 40
229- override_action {
230- none {}
231- }
232- statement {
233- managed_rule_group_statement {
234- vendor_name = " AWS"
235- name = " AWSManagedRulesKnownBadInputsRuleSet"
236- }
237- }
238- visibility_config {
239- cloudwatch_metrics_enabled = true
240- metric_name = " aws-managed-bad-inputs"
241- sampled_requests_enabled = true
242- }
243- }
244-
245- # Reputation Lists Protection
246- rule {
247- name = " AWS-Managed-Amazon-IP-Reputation-List"
248- priority = 50
249- override_action {
250- none {}
251- }
252- statement {
253- managed_rule_group_statement {
254- vendor_name = " AWS"
255- name = " AWSManagedRulesAmazonIpReputationList"
256- }
257- }
258- visibility_config {
259- cloudwatch_metrics_enabled = true
260- metric_name = " aws-managed-ip-rep"
261- sampled_requests_enabled = true
262- }
263- }
264-
265- # Anonymous IP list
266- rule {
267- name = " AWS-Managed-Anonymous-IP-List"
268- priority = 70
269- override_action {
270- none {}
271- }
272- statement {
273- managed_rule_group_statement {
274- vendor_name = " AWS"
275- name = " AWSManagedRulesAnonymousIpList"
276- }
277- }
278- visibility_config {
279- cloudwatch_metrics_enabled = true
280- metric_name = " aws-managed-anonymous-ip"
281- sampled_requests_enabled = true
282- }
283- }
284-
285- # SQL database
286- rule {
287- name = " AWS-Managed-SQLi-Rule-Set"
288- priority = 80
289- override_action {
290- none {}
291- }
292- statement {
293- managed_rule_group_statement {
294- vendor_name = " AWS"
295- name = " AWSManagedRulesSQLiRuleSet"
296- }
297- }
298- visibility_config {
299- cloudwatch_metrics_enabled = true
300- metric_name = " aws-managed-sql-db"
301- sampled_requests_enabled = true
302- }
303- }
304-
305206 visibility_config {
306207 cloudwatch_metrics_enabled = true
307208 metric_name = " ${ var . project_name } -web-acl"
0 commit comments