Often , corporate compliance requirements require that logs be stored for a certain number of years.

This is easily accomplished in GCP - by setting up a sink log for the cloud logs. The sink is defined to be a Cloud Logging Bucket (a special storage bucket).  This bucket comes in two types - a 'default' and a 'required' bucket. The Required bucket cannot be altered in any manner.

Hence, the retention period needs to be set on the 'Default' bucket (say for 5 years).

This allows us to meet the compliance requirement.