From be0be01d537ba4c415a8102252d759e3afdd8afc Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Thu, 3 Feb 2022 14:35:41 +0100 Subject: [PATCH] docs(core): clarify that `addOverride` does not change property casing (#18687) We had a customer passing structs into `add_property_override` (in Python) and being confused why all the keys came out with the wrong casing. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/core/lib/cfn-resource.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/@aws-cdk/core/lib/cfn-resource.ts b/packages/@aws-cdk/core/lib/cfn-resource.ts index f1b4d76a10563..d1f6c3d65ffbb 100644 --- a/packages/@aws-cdk/core/lib/cfn-resource.ts +++ b/packages/@aws-cdk/core/lib/cfn-resource.ts @@ -185,6 +185,12 @@ export class CfnResource extends CfnRefElement { * } * ``` * + * The `value` argument to `addOverride` will not be processed or translated + * in any way. Pass raw JSON values in here with the correct capitalization + * for CloudFormation. If you pass CDK classes or structs, they will be + * rendered with lowercased key names, and CloudFormation will reject the + * template. + * * @param path - The path of the property, you can use dot notation to * override values in complex types. Any intermdediate keys * will be created as needed.