Closed vinnar closed 4 years ago
In the template that gets generated, does it say:
# If you see this, it might be a CDK issue
Priority: "1",
Or:
# If you see this, it's probably just impossible to use WAF v2 using
# YAML templates and that should be reported as a bug to CloudFormation.
Priority: 1
I opened tkt with AWS support and this is the feedback I got (which worked):
Original: statement: { ipSetReferenceStatement: ipSet.attrArn, },
Should be: statement: { ipSetReferenceStatement:{ Arn: ipSet.attrArn } },
So I went back to look at the API reference and I confirmed that ipSetReferenceStatement is a property of object type: https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-wafv2.CfnWebACL.IPSetReferenceStatementProperty.html
@vinnar, @rix0rrr i have same issue in c# still getting error https://github.com/aws/aws-cdk/issues/10058 , and there is no class called IPSetReferenceStatementProperty in .net library
Creating a WAF rule in the stack and creation fails complaining about type for multiple input params.
Reproduction Steps
What did you expect to happen?
What actually happened?
3/13 | 11:10:13 PM | CREATE_IN_PROGRESS | AWS::WAFv2::WebACL | WebACL 4/13 | 11:10:16 PM | CREATE_FAILED | AWS::WAFv2::WebACL | WebACL Model validation failed (#/Rules/0/Priority: expected type: Number, found: String
/Rules/0/Statement/IPSetReferenceStatement: expected type: JSONObject, found: String
/Rules/0/VisibilityConfig/SampledRequestsEnabled: expected type: Boolean, found: String
/Rules/0/VisibilityConfig/CloudWatchMetricsEnabled: expected type: Boolean, found: String
/VisibilityConfig/SampledRequestsEnabled: expected type: Boolean, found: String
/VisibilityConfig/CloudWatchMetricsEnabled: expected type: Boolean, found: String)
Environment
Other
package.json dependencies - "devDependencies": { "@aws-cdk/assert": "1.26.0", "aws-cdk": "1.26.0", "jest": "^24.9.0", "eslint": "^6.8.0", "eslint-config-airbnb-base": "^14.0.0", "eslint-plugin-import": "^2.20.1" }, "dependencies": { "@aws-cdk/core": "1.26.0", "@aws-cdk/aws-cloudfront": "^1.27.0", "@aws-cdk/aws-iam": "^1.27.0", "@aws-cdk/aws-route53": "^1.27.0", "@aws-cdk/aws-route53-targets": "^1.27.0", "@aws-cdk/aws-s3": "1.26.0", "@aws-cdk/aws-s3-assets": "^1.27.0", "@aws-cdk/aws-s3-deployment": "^1.27.0", "@aws-cdk/aws-wafv2": "^1.27.0", "dotenv": "^8.2.0", "js-yaml": "^3.13.1" }
In codepipeline buildspec file i force it to install aws-cdk version mentioned in devDependencies. This had worked without error till last month.
This is :bug: Bug Report