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

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
resource "digitalocean_spaces_bucket" "good_example" {
  name   = "foobar"
  region = "nyc3"

  versioning {
    enabled = true
  }
}