Skip to content

resource/aws_wafv2_web_acl_logging_configuration: New Resource #43457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

omriKaltura
Copy link

Pull Request Description

New Resource: aws_wafv2_web_acl_logging_configuration

This PR implements the aws_wafv2_web_acl_logging_configuration resource, which allows users to configure logging for AWS WAFv2 Web ACLs. This resource enables customers to:

  • Configure log destination configurations for WAFv2 Web ACLs
  • Set up logging filters to control what gets logged
  • Configure redacted fields to exclude sensitive information from logs

Implementation Details

The implementation includes:

  • Complete resource schema definition with appropriate validation rules
  • Full CRUD operations (Create/Put, Read, Update/Put, Delete)
  • Helper functions for data transformation between Terraform and AWS API formats
  • Support for redacted fields including method, query string, single header, and URI path
  • Comprehensive acceptance tests covering various scenarios:
    • Basic resource creation and import
    • Updating single header redacted fields
    • Updating method, query string, and URI path redacted fields
    • Managing multiple redacted fields simultaneously
    • Resource recreation when ARN or log destinations change
    • Proper resource cleanup and disappearance handling
    • Empty redacted fields handling
    • Validation of log destination naming requirements

Acceptance Test Results

All acceptance tests pass successfully, including:

  • Basic resource creation and import
  • Various redacted field configurations
  • Resource recreation scenarios
  • Edge cases and validation tests

Changelog Entry

new resource: aws_wafv2_web_acl_logging_configuration - Provides a resource to manage AWS WAFv2 Web ACL logging configuration

Testing Notes

The implementation has been tested with:

  • Various combinations of redacted fields
  • Different logging filter configurations
  • Resource recreation scenarios
  • Import functionality
  • Proper error handling for invalid configurations

All tests pass successfully in both regional and global WAFv2 contexts.

References

@omriKaltura omriKaltura requested a review from a team as a code owner July 20, 2025 14:14
Copy link

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/wafv2 Issues and PRs that pertain to the wafv2 service. size/XL Managed by automation to categorize the size of a PR. labels Jul 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Waiting for first response or review from a maintainer. service/wafv2 Issues and PRs that pertain to the wafv2 service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant