We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14aa0e8 commit 488c772Copy full SHA for 488c772
terraform/common/main.tf
@@ -63,3 +63,15 @@ resource "aws_wafv2_web_acl_association" "this" {
63
resource_arn = module.alb.alb_arn
64
web_acl_arn = module.waf.web_acl_arn
65
}
66
+
67
+resource "aws_cloudwatch_log_group" "waf_logs" {
68
+ name = "aws-waf-logs-${local.project_name}"
69
+ retention_in_days = 7
70
71
+ tags = local.common_tags
72
+}
73
74
+resource "aws_wafv2_web_acl_logging_configuration" "this" {
75
+ log_destination_configs = [trimsuffix(aws_cloudwatch_log_group.waf_logs.arn, ":*")]
76
+ resource_arn = module.waf.web_acl_arn
77
0 commit comments