wafv2.py - Issue with WebACL Rules attribute and ManagedRuleGroupStatement
See original GitHub issue-
When using the WebACL, the only way I could get it to work was by changing the ‘Rules’ attribute from ‘(Rules, False)’ to ‘([Rule], False)’.
-
When adding a rule to WebACL.Rules[], and adding a statement of type ManagedRuleGroupStatement, Cloudformation seems to require an OverrideAction; though, an Action is optional. I attempted to assign an OverrideAction of None=wafv2.NoneAction(), but without success. I modified the ‘None’ prop of OverrideAction to ‘none’, and Cloudformation was happy. Is there a better way to handle a prop which has the same name as a Python reserved word? Thanks for your help. JS
Modified wafv2.py
class OverrideAction(AWSProperty):
props = {
'Count': (CountAction, False),
'none': (NoneAction, False),
}
Example
OverrideAction=wafv2.OverrideAction(
none=wafv2.NoneAction(),
),
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Developers - wafv2.py - Issue with WebACL Rules attribute and ...
wafv2.py - Issue with WebACL Rules attribute and ManagedRuleGroupStatement ... 1) When using the WebACL, the only way I could get it to...
Read more >AWS::WAFv2::WebACL ManagedRuleGroupStatement
A rule statement used to run the rules that are defined in a managed rule group. To use this, provide the vendor name...
Read more >WAFV2 — Boto3 Docs 1.26.32 documentation - AWS
If you used WAF prior to this release, you can't use this WAFV2 API to access ... You can define a web ACL...
Read more >Python Error: Cannot extract data from dictionary
UPDATE :- In case anyone else comes up against this problem, I fixed this by ... WebACL.Rules[0].Statement.ManagedRuleGroupStatement.Name.
Read more >aws-babylon_wafv2_web_acl | Resources - Terraform Registry
Creates a WAFv2 Web ACL resource. ... See Managed Rule Group Statement below for details. not_statement - (Optional) A logical rule statement used...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As a workaround for the
None
problem, you can do this:This appears fixed in the latest update of Troposphere as I no longer have to use this workaround.