hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.82k stars 9.16k forks source link

[Docs]: WAF logging no longer requires Kinesis Firehose #32544

Closed milh0use closed 1 year ago

milh0use commented 1 year ago

Documentation Link

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_web_acl_logging_configuration

Description

As explained in this AWS Blog Post, the intermediate resource of Kinesis Firehose stream is no longer required to link WAF logging to a Cloudwatch Log Stream.

Previously, WAF logs had to be sent via Amazon Kinesis Data Firehose to AWS OpenSearch, third-party solutions for dashboards, or to Amazon Simple Storage Service (Amazon S3) paired with Amazon Athena for log analysis. Customers would have a high volume of incoming logs, where analyzing logs would become difficult as these configurations required the integration of multiple services for log analysis and dashboards. This was also expensive and customers needed separate teams to keep the solution up to date. To simplify this, logs can now be sent directly to CloudWatch for log analysis, dashboard creation, and viewing alarms in a single pane using CloudWatch features, such as metric filters, Logs Insights, Anomaly detection, and Contributor Insights.

I've successfully linked together resources as follows:

resource "aws_cloudwatch_log_group" "waf_logs" {
    provider = // a provider alias in region us-east-1
    name              = "aws-waf-logs-application"
    retention_in_days = 14
}

resource "aws_wafv2_web_acl_logging_configuration" "application" {
  provider = // a provider alias in region us-east-1
  log_destination_configs = [aws_cloudwatch_log_group.waf_logs.arn]
  resource_arn            = aws_wafv2_web_acl.application.arn
}

References

https://aws.amazon.com/blogs/mt/analyzing-aws-waf-logs-in-amazon-cloudwatch-logs/

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

justinretzolk commented 1 year ago

Hey @milh0use 👋 Thank you for taking the time to raise this! I've opened a pull request to update the documentation, removing the note on the Kinesis requirement.

github-actions[bot] commented 1 year ago

This functionality has been released in v5.9.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.