cloudtools / cloudtools/troposphere
wafv2.py - Issue with WebACL Rules attribute and ManagedRuleGroupStatement
- Dominant language
- Python
- Stars
- 4.9k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
1) 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)'.
2) 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(),
),
```
Contributor guide
Assessment
This issue has not been assessed yet.