(aws-s3-deployment): Make the 'prune' property of bucket deployment required, not optional.
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
By default, files in the destination bucket that don't exist in the source will be deleted when the `BucketDeployment` resource is created or updated. This behaviour can be disabled by setting the property `prune` to `false` and the files will not be deleted.
### Use Case
Many users might miss the `prune` property when setting up bucket deployment in CDK. This will cause the files in the destination bucket that they do not want deleted to be deleted by default when updating or creating the bucket deployment. Making this property required will ensure that users provide a value and understand what to expect when updating or creating the bucket deployment.
### Proposed Solution
Make the `prune` property to be a required property instead of optional.
### Other Information
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_deployment.BucketDeployment.html#prune
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS CDK Library version (aws-cdk-lib)
2.201.0
### AWS CDK CLI version
2.1010.0
### Environment details (OS name and version, etc.)
macOS Sequoia Version 15.5
Contributor guide
Research direction
Start at the aws_s3_deployment.BucketDeployment API entry and inspect how the prune property is declared and documented. Review the linked AWS CDK API reference and the existing BucketDeployment behavior before deciding which tests need updating. Done means the required-property contract and its documented behavior are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100