From d6a4de9c29d8ce5fd99536edde1163d0b321214d Mon Sep 17 00:00:00 2001 From: Ryan Parker Date: Wed, 6 Oct 2021 10:35:17 -0700 Subject: [PATCH] docs(aws-s3): Clarify update is required before setting `autoDeleteObjects` to `false` (#16828) ## Summary This PR: - Updates the documentation of the `aws-s3/Bucket`'s `autoDeleteObjects` prop to clarify that a user must first deploy with the latest CDK package before updating `autoDeleteObjects`'s value to `false` (to prevent the bucket from being emptied). ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-s3/lib/bucket.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/@aws-cdk/aws-s3/lib/bucket.ts b/packages/@aws-cdk/aws-s3/lib/bucket.ts index 1da58cd3db260..d9065d0719c72 100644 --- a/packages/@aws-cdk/aws-s3/lib/bucket.ts +++ b/packages/@aws-cdk/aws-s3/lib/bucket.ts @@ -937,7 +937,7 @@ export interface BucketMetrics { * Specifies a list of tag filters to use as a metrics configuration filter. * The metrics configuration includes only objects that meet the filter's criteria. */ - readonly tagFilters?: {[tag: string]: any}; + readonly tagFilters?: { [tag: string]: any }; } /** @@ -1231,8 +1231,8 @@ export interface BucketProps { * * **Warning** if you have deployed a bucket with `autoDeleteObjects: true`, * switching this to `false` in a CDK version *before* `1.126.0` will lead to - * all objects in the bucket being deleted. Be sure to update to version `1.126.0` - * or later before switching this value to `false`. + * all objects in the bucket being deleted. Be sure to update your bucket resources + * by deploying with CDK version `1.126.0` or later **before** switching this value to `false`. * * @default false */ @@ -1797,7 +1797,7 @@ export class Bucket extends BucketBase { } } - private parseTagFilters(tagFilters?: {[tag: string]: any}) { + private parseTagFilters(tagFilters?: { [tag: string]: any }) { if (!tagFilters || tagFilters.length === 0) { return undefined; }