If I create an S3 bucket via pulumi, what’s the ea...
# general
a
If I create an S3 bucket via pulumi, what’s the easiest way to have pulumi empty the bucket when I try to delete the bucket’s stack?
t
if you use the https://www.pulumi.com/registry/packages/aws/api-docs/s3/bucketobject/ BucketObject resource all your files are resources like anything else, when you delete a stack your files get deleted too
r
force_destroy
option will empty the bucket and delete it https://www.pulumi.com/registry/packages/aws/api-docs/s3/bucket/#force_destroy_python