-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws_kinesis: Stream default removal policy changed in v2.140.0 #30562
Comments
I see this Looks like this would start applying removal policy based on props.removalPolicy which defaults to RETAIN and before that, no removalPolicy is applied. Did you explicitly apply the policy to removal with props.removalPolicy undefined before that PR? Looks like in prior to this PR, the Stream construct would not apply any removalPolicy for the resource? |
@pahud previously, removal_policy was not a constructor property, and we were not calling apply_removal_policy. Thus the CloudFormation template had no DeletionPolicy or UpdateReplacePolicy, which from what I can tell then defaults to “Delete” within CloudFormation. |
@rittneje Adding |
@pahud Where does CDK define the set of "stateful resources"? Evidently this is not a CloudFormation concept, since it does not give Kinesis streams a special default DeletionPolicy/UpdateReplacePolicy. Also, going forward this (or any default value change) really needs to show up in the release notes as an explicit point, not hidden inside an innocuous-sounding item like "update L1 CloudFormation resource definitions". |
@rittneje I agree with you. We need to come up with a better way to consolidate and list what is defined as a stateful resource. As of right now I'm not completely sure why |
Describe the bug
#30037 added a new
removal_policy
parameter the theaws_kinesis.Stream
constructor.This was a breaking change. Previously it defaulted to
DESTROY
but now it defaults toRETAIN
. This causes all of our stacks to leak their Kinesis streams upon deletion.This change was not mentioned in the release notes.
Expected Behavior
removal_policy
should have remainedDESTROY
.Current Behavior
It defaults to
RETAIN
causing all Kinesis streams to leak.Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.143.0 (build 9f2bdf7)
Framework Version
No response
Node.js Version
v22.2.0
OS
Alpine 3.20
Language
Python
Language Version
Python 3.12.3
Other information
No response
The text was updated successfully, but these errors were encountered: