Skip to content

Commit

Permalink
docs(aws-s3): Clarify update is required before setting `autoDeleteOb…
Browse files Browse the repository at this point in the history
…jects` 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*
  • Loading branch information
ryparker authored Oct 6, 2021
1 parent bdbe8b6 commit d6a4de9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-s3/lib/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}

/**
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit d6a4de9

Please sign in to comment.