The reason for the issue is because the soft delete policy constraint (constraints/storage.softDeletePolicySeconds) is enforced by your business. The minimum retention time for soft deletion is specified by this restriction. This restriction is broken by the default value of 7 days (604800 seconds).
Modify the GCS bucket creation code to comply with this policy by explicitly setting a retention period greater than or equal to the enforced duration.
Update or Insert this code snippet(based on this reference) :
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.