Open gebailey opened 1 year ago
@gebailey , thanks for reporting this. Have you tried this with latest cdk version and still facing the issue ??
I upgraded to CDK 2.108.1 and still see this. It's strange because it looks like Cloud Formation is emitting some kind of warning or notice but the CDK output itself appears to complete. If I look at Cloudformation, the "Status reason" for the UPDATE_IN_PROGRESS
step shows:
Resource template validation failed for resource cirrusscanwafacl as the template has invalid properties. Please refer to the resource documentation to fix the template. Properties validation failed for resource cirrusscanwafacl with message: #/Rules/3/Statement/RateBasedStatement/ScopeDownStatement/NotStatement/Statement/SizeConstraintStatement/FieldToMatch/SingleHeader: required key [Name] not found #/Rules/3/Statement/RateBasedStatement/ScopeDownStatement/NotStatement/Statement/SizeConstraintStatement/FieldToMatch/SingleHeader: extraneous key [name] is not permitted
And I think the above warning shows up in our GitHub action output, which is what prompted the issue.
something similar here with GOLANG and SingleHeaderProperty https://github.com/aws/aws-cdk/issues/28074
Hi @gebailey , we have discussed similar issue (https://github.com/aws/aws-cdk/issues/28074) with the team and looking for a workaround. Thanks for reporting this.
Describe the bug
Not sure if this is a documentation bug, or a bug within CDK, but we're trying to modify rule sets on a Web ACL, and it's unclear if the
name
argument towafv2.CfnWebACL.ExcludedRuleProperty
is supposed to be upper-cased or lower-cased. The documentation at https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_wafv2/CfnWebACL.html#excludedruleproperty specifiesname
(with a lower-casen
).But we see the following error (warning?) when running CDK:
The modifications to the rule list seem to take effect, despite the error (warning?) displayed above.
Expected Behavior
I would not expect to see validation errors when using
name
.Current Behavior
I see unexpected validation errors when using
name
:Reproduction Steps
Our CDK stack constructs a WAFv2 Web ACL, and specifies rules using:
Documentation for
wafv2.CfnWebACL.ExcludedRuleProperty
suggests thatname
(lowercase N) should be specified as the parameter, but errors/warnings emitted by CDK suggest it is expectingName
(uppercase N).Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.96.2
Framework Version
No response
Node.js Version
18
OS
Ubuntu Linux
Language
Python
Language Version
Python 3.11
Other information
No response