Open volleynator opened 2 years ago
I confirm this issue! same behavior
Can you open a DigitalOcean support ticket so the team can take a closer look? If s3cmd getlifecycle
is returning the lifecycle rule as defined in Terraform, that suggests that Terraform is working as expected and the issue is on the backend.
Can you open a DigitalOcean support ticket so the team can take a closer look? If
s3cmd getlifecycle
is returning the lifecycle rule as defined in Terraform, that suggests that Terraform is working as expected and the issue is on the backend.
I suppose you are right, I'll reach them after some additional tests. s3cmd
return lifecycle policy same as for OP.
Hello @baznikin, have we been able to resolve this issue for you?
Hello @ChiefMateStarbuck!
Yes, after some trials and tests lifecycle_rule
works for me. My issue was wrong prefix value.
My final code looks almost same as OP policy. I dunno why, maybe something was fixed from API side...
lifecycle_rule {
id = "expire-backups"
enabled = true
abort_incomplete_multipart_upload_days = 2
expiration {
days = 15
}
}
So lifecycle policy doesn't support versioning on the bucket being set to Suspended. If you have versioning enabled then you supposedly have to add something for noncurrent_version_expiration.
If I create a new Space bucket via the Digital Ocean portal 'aws s3api get-bucket-versioning' returns nothing.
If I create a new Space bucket with Terraform using the latest Digital Ocean provider and set versioning to disabled, it creates a bucket that when queried returns versioning status as Suspended.
If I create a new Space bucket with Terraform using the latest Digital Ocean provider and don't have anything specifying 'versioning' at all, then get-bucket-versioning returns nothing.
I would have thought that setting versioning to disabled would have not configured any versioning at all. I guess I have to modify my Terraform module to workaround this. And also test to confirm that lifecycle option works with zero versioning config set (which I assume it does given it works for other people).
Bug Report
Describe the bug
I try to set up lifecycle policy which should expire and delete files after one day. The rule is applied according to s3cmd, however, files are not deleted, they remain inside the space.
Affected Resource(s)
Expected Behavior
Files should be deleted after one day
Actual Behavior
Files remain inside the bucked
Steps to Reproduce
terraform apply
-->Terraform Configuration Files
Expected behavior
Additional context
s3cmd output of
s3cmd getlifecycle