umotif-public / terraform-aws-waf-webaclv2

Terraform module to configure WAF V2 Web ACL with managed rules for Application Load Balancer
https://registry.terraform.io/modules/umotif-public/waf-webaclv2/aws
Other
137 stars 124 forks source link

Fix invalid input map in byte_match_statement #104

Closed nunofernandes closed 1 year ago

nunofernandes commented 1 year ago

Description

Fixes an invalid input map in the byte_match_statement statement

Ohid25 commented 1 year ago

This is now released as a part of 4.6.1!

yuvalhnoga commented 1 year ago

@Ohid25 @nunofernandes this seems to be a breaking change, also this pr

│ Error: Invalid index
│
│   on ../terraform-aws-waf-webaclv2/main.tf line 6210, in resource "aws_wafv2_web_acl" "main":
│ 6128:                       type     = lookup(byte_match_statement.value["text_transformation"], "type")
│     ├────────────────
│     │ byte_match_statement.value is object with 5 attributes
│
│ The given key does not identify an element in this collection value.

This requires us to change our values and add the text_transformation as a nested value, which is fine but this is a bit weird because this change was not applied everywhere so now there is a difference between each statement in how it accepts the values.

nunofernandes commented 1 year ago

@yuvalhnoga let me work on this today and see how can I fix it..

nunofernandes commented 1 year ago

Just created https://github.com/umotif-public/terraform-aws-waf-webaclv2/pull/113 to fix that..