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
WAFv2 AndStatement and OrStatement incorrect validation #2026
Comments
Apology for the regression. As you pointed out it is an easy fix. Can you verify this change fixes it for you? |
And...really fixed this time with a force push. Teach me to multi-task. |
Yep! That would do it. Thank you! |
I'll likely do a quick release this weekend with this, a few other PRs and any latest spec changes over the weekend. BTW, were you ok with the WAFv2 breaking changes done for 4.0.0? I hope it was an improvement. |
Had to rework the pieces on our end around the creation of the resources, but definitely nice to have all of the features available now. Not specific to WAFv2, but one thing that did strike me as odd was that resource objects can be successfully initialized without all of the required properties being given. I thought I remembered it erroring out in situations like that, or am I missing something. ? I thought with a property defined as class SomeProperty(AWSProperty):
props: PropsDictType = {
"Prop1": (TYPE, True),
"Prop2": (TYPE, False),
} if you tried to initialize without defining Was this always the case, or did something change? If not, could that potentially be a feature request? Thank you man |
Fixed in Release 4.0.1 |
Hi guys,
troposphere/troposphere/validators/wafv2.py
Lines 32 to 33 in f287fa8
In the validator for WAFv2 statements, there is a check to see if the number of statements if exactly 2 when it should be looking to see if there are at least 2 statements given.
AWS requires there to be more than one statement, but does not restrict them to only pairs.
A small change in the logic of the
if
statement and theTypeError
message is all that is needed.Thank you
The text was updated successfully, but these errors were encountered: