title: How to set Google cloud Storage bucket (GCS) file object expiration (TTL) using CLI
body: <p>I want to set a policy to a new GCS bucket so that files expire in 14 days (TTL, time to live, or lifecycle ends).</p>
  <p>I use</p>
  <pre><code>gsutil mb \
    -p ${GCP_PROJECT_ID} \
      gs://$GCS_BUCKET_NAME \
    --retention 14d
  
  </code></pre>
  <p>it doesn't work. Why is that?</p>