Skip to content

Ensure the Spaces bucket has versioning enabled

Description

This policy checks whether versioning is enabled for DigitalOcean Spaces buckets. Versioning allows for the recovery of previous versions of objects in case of accidental deletion or overwrite, which is crucial for data integrity and backup purposes. Enabling versioning ensures that data can be restored in the event of a disaster or data loss. This is important for maintaining business continuity and minimizing the impact of data-related incidents.

Code Example

terraform
resource "digitalocean_spaces_bucket" "example" {
  name   = "example-bucket"
  region = "nyc3"
  versioning {
    enabled = true
  }
}

Remediation

Enable versioning for the DigitalOcean Spaces bucket by setting the 'enabled' property to 'true' within the 'versioning' block.

Rule Details

FieldValue
IDIAC-0830
SeverityMEDIUM
IaC TypeTerraform
Frameworksdigitalocean_spaces_bucket
Checkov IDCKV_DIO_1

References