Skip to content
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

Fix 'Invalid value for "inputMap" parameter: the given object has no attribute "type" #102

Merged
merged 1 commit into from
May 19, 2023

Conversation

nunofernandes
Copy link
Contributor

The current code has a bug:

│ 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.

Description

This fixes that issue.

…attribute "type"'

The current code has a bug:
```
│ 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.
@Ohid25 Ohid25 merged commit ee76f54 into umotif-public:main May 19, 2023
@Ohid25 Ohid25 added the bug Something isn't working label May 19, 2023
@Ohid25
Copy link
Contributor

Ohid25 commented May 19, 2023

Thank you for the fix! This is now a part of 4.6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

2 participants