https://pulumi.com logo
#aws
Title
# aws
b

bitter-dentist-28132

09/23/2020, 3:28 PM
i'm having some issues deleting buckets with versioning turned on, anyone know why this might be the case? pulumi doesn't seem to delete any of the content, i have to delete it all manually before running
pulumi destroy
, otherwise it just hangs forever.
b

broad-dog-22463

09/23/2020, 3:29 PM
There is a forceDestroy param that you can set as part of the bucket - you will need to apply that parameter first and then you can run a destroy
b

bitter-dentist-28132

09/23/2020, 3:29 PM
nah, that's not it, it will bail out saying the bucket is not empty if that's the case.
if i want to destroy something with content, i export the stack, edit
forceDestroy
to be
true
, then re-import, and then run the destroy
c

cool-fireman-90027

09/23/2020, 3:41 PM
You can't delete a bucket with versioning turned on: https://aws.amazon.com/premiumsupport/knowledge-center/delete-bucket-s3-console-cli/ you can only suspend the bucket.
b

broad-dog-22463

09/23/2020, 3:54 PM
@bitter-dentist-28132 that's what I was saying - you need to apply that parameter first so that it is part of the state - THEN you can run the deploy
b

bitter-dentist-28132

09/23/2020, 3:56 PM
@broad-dog-22463 yup, as i said, that's exactly what i did, that's not the issue. @cool-fireman-90027 ah i see, i guess the implication is that pulumi doesn't empty the bucket before attempting to delete it?
if i completely empty the bucket using the console, i can then delete the bucket through pulumi, so i imagine that's it.
@cool-fireman-90027 from the page you linked, i get the sense the requests to aws should fail (rather than hang forever) -- do you know if that is indeed the case?
c

cool-fireman-90027

09/23/2020, 4:05 PM
@bitter-dentist-28132 I don't know if that is the expected behavior.
👍 1
b

broad-dog-22463

09/23/2020, 4:23 PM
@bitter-dentist-28132 this is a bug then - forceDestroy SHOULD delete all objects!
b

bitter-dentist-28132

09/23/2020, 4:33 PM
@broad-dog-22463 i've submitted https://github.com/pulumi/pulumi-aws/issues/1132
b

broad-dog-22463

09/23/2020, 4:33 PM
thanks