Skip to content

Instantly share code, notes, and snippets.

@so-jelly
Created April 22, 2019 20:32
Show Gist options
  • Save so-jelly/f91830555e36a6cc90d5b9521b3b52d3 to your computer and use it in GitHub Desktop.
Save so-jelly/f91830555e36a6cc90d5b9521b3b52d3 to your computer and use it in GitHub Desktop.
GCS bucket version and lifecycle
{
"lifecycle": {
"rule": [{
"action": {
"type": "Delete"
},
"condition": {
"numNewerVersions": 14
}
}]
}
}
#!/bin/sh
BUCKET=changeme
gsutil versioning set on gs://${BUCKET}
gsutil lifecycle set lifecycle.json gs://${BUCKET}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment