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

AWS WAFv2 Web ACL Logging - Redacted Fields Removal #19789

Closed lee-clements-rft closed 1 year ago

lee-clements-rft commented 3 years ago

Community Note

Terraform CLI and Terraform AWS Provider Version

Terraform v1.0.0
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v3.45.0
+ provider registry.terraform.io/hashicorp/tls v3.1.0...

Affected Resource(s)

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "aws_wafv2_web_acl_logging_configuration" "example" {
  log_destination_configs = [aws_kinesis_firehose_delivery_stream.example.arn]
  resource_arn            = aws_wafv2_web_acl.example.arn
  redacted_fields {
    single_header {
      name = "my-test-header"
    }
  }
}
...

Debug Output

Panic Output

Expected Behavior

When the redacted_fields block which contains a HTTP header (my-test-header) is removed and a terraform apply is ran, I would expect the redacted fields configuration to be removed.

Actual Behavior

The HTTP header is not removed when the configuration block is removed. Terraform shows no changes detected. The AWS console shows the HTTP header is still redacted.

Steps to Reproduce

  1. terraform apply

Important Factoids

I have provided a really basic example to keep it as simple as possible. I am using dynamic blocks and have a whole WAF configuration as well which can be provided if required.

References

github-actions[bot] commented 1 year ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. 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.