Closed NadeemPatel closed 4 years ago
Asking jsii folks to weigh in on which issue this is a duplicate of :)
So the problem is with how you set default_action
being an invalid access: waf.CfnWebACL.DefaultActionProperty.allow
is an instance method on the waf.CfnWebACL.DefaultActionProperty
type.
The correct way to set this is the following:
webAcl = waf.CfnWebACL(
self,Project+"-"+Env+"-web-acl",
default_action= waf.CfnWebACL.DefaultActionProperty(allow={}),
scope="CLOUDFRONT",
visibility_config=waf.CfnWebACL.VisibilityConfigProperty(
cloud_watch_metrics_enabled=True,
metric_name=Project+"-"+Env+"-web-acl",
sampled_requests_enabled=False
)
)
I have confirmed this to work and produce the output I'd have expected there, so I will be resolving this.
This needs a documentation update to have a Python sample.
description of the bug:
I am trying to create AWS WAF web acl using cdk wafv2 - cfnwebacl() construct, but getting following error.
AttributeError: type object 'property' has no attribute '__jsii_type__'
Reproduction Steps
Error Log
Environment
This is :bug: Bug Report