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
| Field | Value |
|---|---|
| ID | IAC-0830 |
| Severity | MEDIUM |
| IaC Type | Terraform |
| Frameworks | digitalocean_spaces_bucket |
| Checkov ID | CKV_DIO_1 |