Just a general question. Scenario: I cannot run a...
# general
a
Just a general question. Scenario: I cannot run a successful
pulumi destroy
if the deployed stack contains a bucket with existing objects. I can easily delete such buckets with the AWS CLI (e.g.
aws s3 rb --force
<s3://my-bucket-with-objects>
). (I know this is an AWS restriction that we override with the
--force
flag). Question: Is there a way to tell pulumi to destroy bucket resources even if they have objects inside (and let it handle doing a forceful destroy of these buckets?). This is my ideal scenario instead of running special pre-destroy operations by hand.
b
Have you tried adding “forceDestroy: true” to the bucket arguments?
You may need to run Pulumi up to apply this property first
a
I completely missed that! Thank you that's exactly what I'm looking for! 😄
b
No worries! Glad it worked for you