From b2ce772b71cfcde495fee41ff0644684c62de93b Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Thu, 27 Jan 2022 12:29:25 +0100 Subject: [PATCH] docs(core): clarify that `addOverride` does not change property casing 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. --- 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.