diff --git a/packages/@aws-cdk/cfnspec/build-tools/validate-evolution.ts b/packages/@aws-cdk/cfnspec/build-tools/validate-evolution.ts index 918c495cf173b..53678ebfa97f4 100644 --- a/packages/@aws-cdk/cfnspec/build-tools/validate-evolution.ts +++ b/packages/@aws-cdk/cfnspec/build-tools/validate-evolution.ts @@ -74,8 +74,13 @@ function validatePropertyTypeNameConsistency(oldSpec: any, newSpec: any) { // Might have disappeared, but no one should have been using this continue; } + if (newSpec.DeletedPropertyTypes?.[key]) { + // Marked as deleted on purpose + continue; + } operations.push({ + $comment: `If ${cfnResource}.${typeName} was renamed, use this and the 'replace's below. Remove this comment.`, op: 'move', from: `/PropertyTypes/${cfnResource}.`, path: `/PropertyTypes/${cfnResource}.${typeName}`, @@ -86,6 +91,13 @@ function validatePropertyTypeNameConsistency(oldSpec: any, newSpec: any) { path, value: typeName, }))); + + operations.push({ + $comment: `If ${cfnResource}.${typeName} was deleted on purpose, use this. Remove this comment.`, + op: 'add', + path: `/DeletedPropertyTypes/${cfnResource}.${typeName}`, + value: true, + }); } const exampleJsonPatch = { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/599_DeletedPropertyTypes.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/599_DeletedPropertyTypes.json new file mode 100644 index 0000000000000..f6e46afe43c4a --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/599_DeletedPropertyTypes.json @@ -0,0 +1,3 @@ +{ + "DeletedPropertyTypes": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/600_Renames_20230630_patch.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/600_Renames_20230630_patch.json new file mode 100644 index 0000000000000..aac5f122c16cb --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/600_Renames_20230630_patch.json @@ -0,0 +1,47 @@ +{ + "patch": { + "description": "Undoing upstream property type renames introduced in 129.0.0", + "operations": [ + { + "op": "add", + "path": "/DeletedPropertyTypes/AWS::LakeFormation::DataLakeSettings.Permissions", + "value": true + }, + { + "op": "add", + "path": "/DeletedPropertyTypes/AWS::QuickSight::Analysis.ColorsConfiguration", + "value": true + }, + { + "op": "add", + "path": "/DeletedPropertyTypes/AWS::QuickSight::Analysis.CustomColor", + "value": true + }, + { + "op": "add", + "path": "/DeletedPropertyTypes/AWS::QuickSight::Dashboard.ColorsConfiguration", + "value": true + }, + { + "op": "add", + "path": "/DeletedPropertyTypes/AWS::QuickSight::Dashboard.CustomColor", + "value": true + }, + { + "op": "add", + "path": "/DeletedPropertyTypes/AWS::QuickSight::Template.ColorsConfiguration", + "value": true + }, + { + "op": "add", + "path": "/DeletedPropertyTypes/AWS::QuickSight::Template.CustomColor", + "value": true + }, + { + "op": "add", + "path": "/DeletedPropertyTypes/AWS::SageMaker::ModelPackage.UserContext", + "value": true + } + ] + } +}