Ensure GCP Cloud storage has versioning enabled

Error: GCP Cloud storage does not have versioning enabled

Bridgecrew Policy ID: BC_GCP_GENERAL_39
Checkov Check ID: CKV_GCP_78
Severity: LOW

GCP Cloud storage does not have versioning enabled

Description

Enabling versioning for your Google Cloud Platform (GCP) Cloud Storage can help improve the security and management of your data. Versioning allows you to keep multiple versions of an object in your storage bucket, and can be useful for a variety of purposes.

Fix - Runtime

Fix - Buildtime

Terraform

resource "google_storage_bucket" "pass" {
  name     = "foo"
  location = "EU"

  versioning = {
    enabled = true
  }=
}