Google Cloud Storage

Lifecycle Management Rules Missing

Ensures that storage buckets are using lifecycle management rules.

Risk Level: Low

Description

This plugin guarantees that lifecycle management rules are in place for Google Cloud Storage buckets. Object Lifecycle Management is a Google Cloud Platform tool that allows you to specify rules for typical scenarios including keeping noncurrent versions of objects, defining a TTL for objects, and downgrading storage classes to reduce unnecessary charges.

About the Service

Google Cloud Storage:

Google Cloud Storage is a service that provides dependable and secure storage classes for any workload, allowing users to select cost-effective storage alternatives based on their requirements. You can effortlessly move data to Cloud storage and benefit from its strong security and scalability features. To know more, read here

Impact

Lifecycle management rules are extremely beneficial in enhancing the efficiency of the objects as well as reducing errors and unnecessary costs.

Steps to Reproduce

Using GCP Console-

  1. Log In to your GCP Console.
  2. From the top navigation bar, select the GCP project you want to investigate.
  3. From the navigation panel on the left side of the console, go to Cloud Storage and select Browser. You can use this link here to navigate directly if you’re already logged in.
  4. In the list of buckets available, check the Lifecycle rules column to find out which buckets do not have any lifecycle rules set. The number of rules will be displayed if the bucket has lifecycle rules set. If this isn't the case, none will be displayed indicating that there are no lifecycle rules for the selected storage bucket.
  5. If you have multiple projects, repeat steps 2 to 4 for each project in your GCP Console. 

Steps for Remediation 


Determine whether or not you truly do not require lifecycle management rules to be set. If not, make the necessary changes to configure it using the steps below.


Using GCP Console-

  1. Log In to your GCP Console.
  2. From the top navigation bar, select the GCP project you want to investigate.
  3. From the navigation panel on the left side of the console, go to Cloud Storage and select Browser. You can use this link here to navigate directly if you’re already logged in.
  4. Select the storage bucket you want to reconfigure from the list of buckets displayed and go to the LIFECYCLE tab of the selected bucket. (In case you aren’t sure which storage bucket needs to be configured, follow the steps to reproduce listed above to determine which to choose.)
  5. Click on ADD A RULE.
  6. In the Add object lifecycle rule page, set the required configurations according to your needs. Select an action, object conditions and click CREATE to create the rule.



  7. Repeat steps 4 to 6 for all the buckets you want to reconfigure in the selected project.
  8. If you have multiple projects, repeat steps 2 to 7 for each project in your GCP console.

References-