Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with spec in wafv2 RegularExpressionList #1300

Merged
merged 1 commit into from
Jan 11, 2020

Conversation

kddejong
Copy link
Contributor

Issue #, if available:
Fix #1286
Description of changes:

  • Patch spec to fix an issue with wafv2 RegularExpressionList

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kddejong
Copy link
Contributor Author

Confirmed that the spec is wrong and that the new changes will both pass cfn-lint and result in a successful deployment.

@codecov
Copy link

codecov bot commented Jan 11, 2020

Codecov Report

Merging #1300 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1300   +/-   ##
=======================================
  Coverage   87.62%   87.62%           
=======================================
  Files         137      137           
  Lines        8123     8123           
  Branches     1995     1995           
=======================================
  Hits         7118     7118           
  Misses        597      597           
  Partials      408      408

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8a7a60...376ea8b. Read the comment docs.

@kddejong kddejong merged commit 4f1a2ea into aws-cloudformation:master Jan 11, 2020
@kddejong kddejong deleted the Fix/1286 branch January 11, 2020 12:11
"path": "/ResourceTypes/AWS::WAFv2::RegexPatternSet/Properties/RegularExpressionList",
"value": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-regexpatternset-regularexpressionlist.html#cfn-wafv2-regexpatternset-regularexpressionlist-regularexpressionlist",
"ItemType": "Regex",
Copy link
Contributor

@PatMyron PatMyron Jan 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"ItemType": "Regex",
"PrimitiveItemType": "String",

still getting: E3002: Expecting an object at Resources/RegexPatternSet/Properties/RegularExpressionList/0

with this deployable template:

https://github.com/PatMyron/cloud/blob/3a08e527688da6a5b06ff9c2eaa873db31481783/cloudformation/minimal.yaml#L658-L664

Resources:
  RegexPatternSet:
    Type: AWS::WAFv2::RegexPatternSet
    Properties:
      Name: Name
      Scope: REGIONAL
      RegularExpressionList:
        - RegularExpression

Will check if the RegexString property is also valid

@kddejong
Copy link
Contributor Author

kddejong commented Jan 11, 2020

@PatMyron
Copy link
Contributor

@kddejong

Resources:
  RegexPatternSet:
    Type: AWS::WAFv2::RegexPatternSet
    Properties:
      Name: Name
      Scope: REGIONAL
      RegularExpressionList:
        - RegexString: RegularExpression

also successfully deploys and now successfully lints, so this is probably fine

@PatMyron PatMyron added the spec CloudFormation Specification Bug label Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec CloudFormation Specification Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WAFv2 error E3002
2 participants