│ Error: Invalid function argument
│
│ on .terraform/modules/waf.waf/main.tf line 6111, in resource "aws_wafv2_web_acl" "main":
│ 6111: priority = lookup(byte_match_statement.value, "priority")
│ ├────────────────
│ │ byte_match_statement.value is object with 4 attributes
│
│ Invalid value for "inputMap" parameter: the given object has no attribute "priority".
╵
╷
│ Error: Invalid function argument
│
│ on .terraform/modules/waf.waf/main.tf line 6112, in resource "aws_wafv2_web_acl" "main":
│ 6112: type = lookup(byte_match_statement.value, "type")
│ ├────────────────
│ │ byte_match_statement.value is object with 4 attributes
│
│ Invalid value for "inputMap" parameter: the given object has no attribute "type".
This happens because we need to fetch the text_transformation element of the object and not the object itself.
The current code has a bug:
This happens because we need to fetch the text_transformation element of the object and not the object itself.
Description
This fixes that issue.