Deleting S3 objects on Destroy

Hey guys, pretty new to Terraform which i using to provision infrastructure in AWS.

Current script deploys S3 bucket with a Cloudfront distribution which is working fine. I manually add files which i will replace by using bitbucket pipelines to deploy as my next step.

However, when destroying this deployment it will fail as the bucket is not empty, due to manually deployed files.

Just wondered if there was a way to empty the bucket on destroy?


submitted by /u/Trick-Bumblebee-3555
[link] [comments]

Read more here:

Content Attribution

This content was originally published by /u/Trick-Bumblebee-3555 at Terraform, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: