Skip to content

aws_cdk.RemovalPolicy: Default is stated incorrectly as Destroy #23897

@sm-javed

Description

@sm-javed

Describe the issue

Destroy is indicated as the default which is incorrect for AWS CDK as can be seen in:

  • CDK Developer Guide
    RemovalPolicy.RETAIN Keep the contents of the resource when destroying the stack (default). The resource is orphaned from the stack and must be deleted manually. If you attempt to re-deploy the stack while the resource still exists, you will receive an error message due to a name conflict
    cdk

  • API reference --> S3/Bucket class that shows:
    removal_policy (Optional[RemovalPolicy]) removal_policy (Optional[[RemovalPolicy] – Policy to apply when the bucket is removed from this stack. Default: - The bucket will be orphaned.

In essence, Retain is the default, not Destroy.

Could we kindly have this updated.
Many thanks for the help.

Links

https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk/RemovalPolicy.html#aws_cdk.RemovalPolicy.DESTROY

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-s3Related to Amazon S3bugThis issue is a bug.documentationThis is a problem with documentation.effort/smallSmall work item – less than a day of effortp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions