-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Open
Labels
@aws-cdk/aws-s3Related to Amazon S3Related to Amazon S3effort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2
Description
Allow setting autoDeleteObjects property of Bucket construct outside constructor.
Use Case
Buckets are often created as part of other constructs (ex: CodePipeline, CDKPipeline, Canary, etc), so developer doesn't always get to control props passed to constructor. In test or transient environments, I don't want any buckets to linger after stack is deleted. As a developer I could work around that by writing an Aspect that finds all instances of Bucket and setting autoDeleteObjects to true (as well as RemovalPolicy to DESTROY). However, at the moment it is not possible, as this property is not exposed outside constructor props.
Proposed Solution
Make enableAutoDeleteObjects method inside Bucket public
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
keenangraham, Serpenthalis, ayush987goyal, TheCrazyKing, mikejgray and 2 more
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-s3Related to Amazon S3Related to Amazon S3effort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2