You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Issue # (if applicable)
Closes#23897.
### Reason for this change
The documentation for `RemovalPolicy.DESTROY` incorrectly states that it is the default removal policy, when in fact `RETAIN` is the actual default for most resources in the AWS CDK. This creates confusion for users who expect different behavior based on the documentation, potentially leading to unexpected costs or resource retention issues.
### Description of changes
Updated the JSDoc comment for `RemovalPolicy.DESTROY` in `removal-policy.ts` to remove the incorrect statement that it is the default removal policy. The comment now accurately describes that this policy will physically destroy resources when applied, without claiming it's the default behavior.
**Changes made:**
- Modified the JSDoc comment for `DESTROY` enum value to clarify it is not the default removal policy
- Ensured consistency with other CDK documentation that correctly states `RETAIN` is the default
**Alternatives considered:**
- Could have updated all related documentation simultaneously, but this focused change addresses the core issue in the source code
- Considered adding explicit mention of what the actual default is, but kept the change minimal to avoid over-documentation
**Design decisions:**
- Kept the change simple and focused on removing the incorrect information rather than adding extensive explanations
- Maintained consistency with existing comment style and format
### Describe any new or updated permissions being added
No new or updated IAM permissions are needed for this documentation change.
### Description of how you validated changes
- Verified the comment change accurately reflects the actual CDK behavior
- Confirmed the change aligns with existing CDK documentation that correctly states `RETAIN` is the default
- Reviewed related code in bucket.ts and other resources to ensure consistency
- Built and tested locally to ensure no compilation issues
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
0 commit comments