Skip to content

aws-cdk-lib: add RetainExceptOnCreate to RemovalPolicy enum #26570

@rittneje

Description

@rittneje

Describe the feature

CloudFormation recently added a new DeletionPolicy RetainExceptOnCreate. Please add an equivalent enum value to RemovalPolicy.

Note: There is no corresponding UpdateRemovalPolicy for this. Presumably the new enum value should translate to an UpdateRemovalPolicy of Retain.

Use Case

We don't want to retain newly created resources since they are essentially empty. Generally this comes up where the deployment fails for some reason and CloudFormation rolls back. But then we cannot try again without manual intervention since it will try to create the same resoruce again and fail.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.89.0

Environment details (OS name and version, etc.)

Alpine 3.18

Metadata

Metadata

Assignees

Labels

aws-cdk-libRelated to the aws-cdk-lib packagefeature-requestA feature should be added or improved.p1

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions