MEDIUM
Source
Trivy
ID
AVD-DIG-0007

Spaces buckets should have versioning enabled

Versioning is a means of keeping multiple variants of an object in the same bucket. You can use the Spaces (S3) Versioning feature to preserve, retrieve, and restore every version of every object stored in your buckets. With versioning you can recover more easily from both unintended user actions and application failures.

Impact

Deleted or modified data would not be recoverable

Follow the appropriate remediation steps below to resolve the issue.

Enable versioning to protect against accidental or malicious removal or modification

1
2
3
4
5
6
7
8
9
 resource "digitalocean_spaces_bucket" "good_example" {
   name   = "foobar"
   region = "nyc3"
 
   versioning {
 	enabled = true
   }
 }