Ensures bucket retention policy is set and locked to prevent deleting or updating of bucket objects or retention policy.
Configuring retention policy for bucket prevents accidental deletion as well as modification of bucket objects. This retention policy should also be locked to prevent policy deletion.
Follow the appropriate remediation steps below to resolve the issue.
Log into the Google Cloud Platform Console.
Scroll down the left navigation panel and choose “Cloud Storage” to select the “Buckets” option.
On the “Buckets” page, select the bucket which you want to configure by clicking on its name.
Select the “PROTECTION” tab to access the protection configuration defined for selected bucket.
Scroll down to “Bucket retention policy” configuration and click on “SET RETENTION POLICY” to add the retention policy to the selected bucket
A popup panel will appear, select the desired retention period and click on “save” to save the retention policy.
Repeat steps number 4-6 to add retention policy to all other buckets in the project.