I want to delete my non empty s3 bucket created with terraform. I used force_destroy=true option as well but still i get
BucketNotEmpty: The bucket you tried to delete is not empty
status code: 409, request id: xxxx, host id: xxxxxxx
also the bucket was created with force_destroy option:
resource "aws_s3_bucket" "pipelineartifactstore" {
bucket = "${var.prefix}-${var.namespace}-${var.stage}-pipeline-artifactstore"
acl = "private"
force_destroy = true
server_side_encryption_configuration {
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}
tags = var.default_tags
}