Skip to content
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

Feature Request: Add support for autoDeleteObjects and removalPolicy properties on created Bucket #306

Open
El-Jefe-Carne opened this issue May 23, 2021 · 1 comment

Comments

@El-Jefe-Carne
Copy link

Recently found and used this package in an implementation. Fantastic work, and really appreciate what has been done here.

I ran destroy for the first time on my stack and I noticed that cloud formation had its bucket deletion skipped. Since this package uses the Bucket object from @aws-cdk/aws-s3 package, I was hoping you could add support into this project's config that allows me to set the removalPolicy and autoDeleteObjects from the SPADeploy config object.

In attempting to do this without an update to the pacakage, I added the following to my code after the initialization of the SPADeploy:

deployment.websiteBucket.applyRemovalPolicy(RemovalPolicy.DESTROY);

Unfortunately, CloudFormation won't delete a bucket with objects in it unless the autoDeleteObjects prop is set to true in the Bucket config, and I don't see a way to set that after initialization of the Bucket like with the removalPolicy.

Looking for this:
image

Thanks again!

@SimonLdj
Copy link

Hi @El-Jefe-Carne , just noted my PR #362 match exactly for what you are asking for.
Basically waiting for the owner to take a look :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants