Closed sheplu closed 8 months ago
Hi @sheplu 👋
This seems to be similar to #3458. There has been a small performance related change to that resource in CDKTF 0.20.1 (changelog, https://github.com/hashicorp/terraform-cdk/pull/3414) which removes generated types for some attributes of this resource.
In practice this means that managedRuleGroupStatement
(and all nested attribute names) would need to be snake-cased to managed_rule_group_statement
as there is no more generated class doing that camel-case to snake-case conversion.
My comment on that other issue has an example: https://github.com/hashicorp/terraform-cdk/issues/3458#issuecomment-1905657553
Sorry for the trouble this caused!
Hi @ansgarm
Thanks for the answer, indeed this is the same issue! I don't know why I was not able to found it while searching. Is there any plan to change that behaviour and back to the previous one to not mix snake-case and camelCase? Also providing the good type as now this is a simple "any" ?
In any case the documentation will need to be updated as the example is now showing something wrong https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_web_acl?lang=typescript I guess this is fully automated but if needed I can PR the change in the doc (if you can point me to the right direction)
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've 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.
Expected Behavior
It should be deploying a WAFv2WebACL with rules as it was doing it with the previous minor version.
Actual Behavior
When I try to add a rule in an AWS WAFv2 (AWS WAFv2WebACL) configuration, this should work and not crash with the following error.
Steps to Reproduce
Versions
language: typescript cdktf-cli: 0.20.3 node: v20.11.0 cdktf: 0.20.3 constructs: 10.3.0 jsii: null terraform: 1.7.1 arch: x64 os: linux 6.2.0-1019-azure providers aws@~>5 (LOCAL) terraform provider version: 5.35.0 @cdktf/provider-aws (PREBUILT) terraform provider version: 5.34.0 prebuilt provider version: 19.3.0 cdktf version: ^0.20.0
Providers
I tried with the two way to use the provider
Gist
No response
Possible Solutions
As this was working with the
aws-provider@5.31.0
, and as I am seeing a difference between 18.2 and 19.3 in theWafv2WebAclRule
I guess this could be the issue// 19.3
// 18.2
Full files below
// 19.3
// 18.2
Workarounds
No response
Anything Else?
No response
References
No response
Help Wanted
Community Note