Other Articles

Cloud Storage – Enable Bucket Versioning

This check ensures that object versioning is enabled to protect against accidental deletion or modification.

Check Details

  • Resource: Storage
  • Check: Enable object versioning
  • Risk: Without object versioning enabled, deleted or overwritten objects cannot be recovered, increasing the risk of permanent data loss.

Remediation via Google Cloud Console

  1. Log in to the Google Cloud Console and navigate to Buckets. GCP Storage browser
  2. Click on the name of the affected Cloud Storage bucket.
  3. Open the Protection tab.
  4. Locate the Object versioning section and click Edit. Bucket versioning
  5. Confirm. Enable object versioning

Remediation via Google Cloud CLI

  1. Open the Google Cloud Console and launch Cloud Shell. GCP Cloud Shell
  2. Enable object versioning on the bucket:
    
    gsutil versioning set on gs://<BUCKET_NAME>/
    

Replace <BUCKET_NAME> with the name of the Cloud Storage bucket.

Default Value

By default, object versioning is disabled on Google Cloud Storage buckets.