From e03d8b882c612b61760a3bf712fcd16f1de7220b Mon Sep 17 00:00:00 2001 From: Vinayak Kukreja <78971045+vinayak-kukreja@users.noreply.github.com> Date: Tue, 21 Mar 2023 02:38:00 -0700 Subject: [PATCH] fix(WAFv2): add patch to revert struct names (#24703) This PR is reverting the property type names from pattern `FooAction` to `Foo` for `WAFv2` resource. This change was introduced as part of a [CFNSpec merge](https://github.com/aws/aws-cdk/commit/affe040c8443be074822254d1e75a28b264cd801#diff-827a2fd012e049c7ccedffa0360c12e7d967a173f36b8150de73ef6adc42ee4cL175-L357) and would be breaking existing customers if they were using previous property names. Duplicating from [PR](https://github.com/aws/aws-cdk/pull/24651) for same issue for V2. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../500_Revert_To_Json_Types_patch.json | 9 ++ ...Fv2_RuleGroup_Rename_Properties_patch.json | 102 ++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_WAFv2_RuleGroup_Rename_Properties_patch.json diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_Revert_To_Json_Types_patch.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_Revert_To_Json_Types_patch.json index 46be6ad53f505..808312bb9c8d7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_Revert_To_Json_Types_patch.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_Revert_To_Json_Types_patch.json @@ -904,6 +904,15 @@ "path": "/Properties/Captcha/PrimitiveType", "value": "Json" }, + { + "op": "remove", + "path": "/Properties/Challenge/Type" + }, + { + "op": "add", + "path": "/Properties/Challenge/PrimitiveType", + "value": "Json" + }, { "op": "remove", "path": "/Properties/Count/Type" diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_WAFv2_RuleGroup_Rename_Properties_patch.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_WAFv2_RuleGroup_Rename_Properties_patch.json new file mode 100644 index 0000000000000..c040a1da5b032 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_WAFv2_RuleGroup_Rename_Properties_patch.json @@ -0,0 +1,102 @@ +{ + "patch": { + "description": "Reverting property type names from FooAction to Foo, which were introduced as part of this PR: https://github.com/aws/aws-cdk/pull/23984", + "operations": [ + { + "op": "remove", + "path": "/PropertyTypes/AWS::WAFv2::RuleGroup.AllowAction" + }, + { + "op": "add", + "path": "/PropertyTypes/AWS::WAFv2::RuleGroup.Allow", + "value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-allowaction.html", + "Properties": { + "CustomRequestHandling": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-allowaction.html#cfn-wafv2-rulegroup-allowaction-customrequesthandling", + "Required": false, + "Type": "CustomRequestHandling", + "UpdateType": "Mutable" + } + } + } + }, + { + "op": "remove", + "path": "/PropertyTypes/AWS::WAFv2::RuleGroup.BlockAction" + }, + { + "op": "add", + "path": "/PropertyTypes/AWS::WAFv2::RuleGroup.Block", + "value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-blockaction.html", + "Properties": { + "CustomResponse": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-blockaction.html#cfn-wafv2-rulegroup-blockaction-customresponse", + "Required": false, + "Type": "CustomResponse", + "UpdateType": "Mutable" + } + } + } + }, + { + "op": "remove", + "path": "/PropertyTypes/AWS::WAFv2::RuleGroup.CaptchaAction" + }, + { + "op": "add", + "path": "/PropertyTypes/AWS::WAFv2::RuleGroup.Captcha", + "value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-captchaaction.html", + "Properties": { + "CustomRequestHandling": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-captchaaction.html#cfn-wafv2-rulegroup-captchaaction-customrequesthandling", + "Required": false, + "Type": "CustomRequestHandling", + "UpdateType": "Mutable" + } + } + } + }, + { + "op": "remove", + "path": "/PropertyTypes/AWS::WAFv2::RuleGroup.ChallengeAction" + }, + { + "op": "add", + "path": "/PropertyTypes/AWS::WAFv2::RuleGroup.Challenge", + "value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-challengeaction.html", + "Properties": { + "CustomRequestHandling": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-challengeaction.html#cfn-wafv2-rulegroup-challengeaction-customrequesthandling", + "Required": false, + "Type": "CustomRequestHandling", + "UpdateType": "Mutable" + } + } + } + }, + { + "op": "remove", + "path": "/PropertyTypes/AWS::WAFv2::RuleGroup.CountAction" + }, + { + "op": "add", + "path": "/PropertyTypes/AWS::WAFv2::RuleGroup.Count", + "value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-countaction.html", + "Properties": { + "CustomRequestHandling": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-countaction.html#cfn-wafv2-rulegroup-countaction-customrequesthandling", + "Required": false, + "Type": "CustomRequestHandling", + "UpdateType": "Mutable" + } + } + } + } + ] + } + } \ No newline at end of file