
Setting a custom Cloud Logging retention window in Google Cloud is simple, which is exactly why so many log buckets end up holding data past their organization’s approved maximum. Engineers often raise retention limits during an incident investigation or audit prep and forget to reset them afterward. As a result, log storage costs accumulate quietly across complete billed days. However, you should never lower a bucket’s retention period just because it exceeds a standard policy number. First, you need to verify why the extended window exists, check for compliance mandates, and then adjust the configuration safely.
Key takeaways
- Google Cloud includes 30 days of default storage in the standard log ingestion price, while keeping logs past 30 days adds a recurring monthly retention fee.
- Bringing an out-of-policy log bucket back to your approved maximum requires a 3-step workflow: verify legal and audit needs, update the retention setting, and check later billing.
- Billing data shows what a bucket’s log storage costs on complete billed days, but it cannot prove whether a legal hold or external compliance rule requires those older logs.
How Cloud Logging retention affects storage charges
Google Cloud routes incoming project logs into two default buckets automatically: _Required and _Default. Teams can also create user-defined log buckets for specific applications, environments, or security sinks.

According to the Google Cloud Observability pricing page, the _Required bucket holds Admin Activity audit logs, System Event logs, and Access Transparency logs for a fixed 400 days at no charge. You cannot modify or delete that bucket.
In contrast, the _Default bucket and any user-defined buckets follow standard pricing. Google charges a one-time ingestion fee of $0.50 per GiB for standard logs (after a 50 GiB monthly free allotment per project) or $0.25 per GiB for vended network logs. That initial charge includes 30 days of storage.
However, according to the Cloud Logging quotas and limits documentation, you can configure custom Cloud Logging retention between 1 day and 3,650 days on _Default and user-defined project buckets. Once a bucket retains logs past the default 30-day window, Google bills an ongoing retention fee of $0.01 per GiB per month for every month the data remains stored.
Therefore, every extra month of retention multiplies your stored data volume against that recurring monthly fee. When high-throughput workloads write terabytes of logs daily, keeping a bucket well past your organization’s approved maximum creates an ongoing storage charge that grows until the oldest logs finally expire.
Log buckets kept longer than the approved retention
In many organizations, an internal governance policy defines the maximum number of days a project may store operational logs. Nevertheless, individual log buckets inside specific projects frequently drift above that approved threshold.

You can spot this drift by pairing configuration data with your Google Cloud Billing export. First, inspect your projects using the Logs Storage page in the Google Cloud console or the gcloud logging buckets list command to see the configured retention days for each bucket. Next, compare those settings against your organization’s approved maximum retention days. Then, query your Google Cloud Billing export or check Cloud Monitoring billing metrics to see the gross log storage cost generated by that specific bucket and project across complete billed days. Tools like Binadox can also surface log buckets whose retention days exceed your approved policy alongside their billed storage costs.
Why buckets drift past policy
Buckets usually exceed policy for two reasons. First, an engineer might temporarily extend Cloud Logging retention on a project bucket to troubleshoot a recurring bug or review historical security events. Once the ticket closes, nobody resets the duration. Second, teams often deploy Terraform modules or deployment scripts with hardcoded retention values that predate current company standards.
Regardless of how the setting changed, the billing export and bucket metadata only show part of the picture. Billing data proves that a named log bucket in a specific project retains logs above your approved maximum and shows what its log storage costs on complete billed days. However, billing data cannot prove why that setting was chosen. It cannot tell you whether a contract, an active lawsuit, or a sector regulation forbids shortening that window.
Audit and legal requirements that justify longer retention
Before you change any bucket setting, you must confirm that no audit or legal requirement needs the longer retention period. When you lower a log bucket’s retention window, Cloud Logging deletes log entries older than the new threshold. Because you cannot recover purged log entries from a bucket once they expire, skipping verification can cause a serious compliance failure.
Start your investigation by identifying the resource owner. Check project labels, IAM policy bindings, or internal service catalogs to find the team responsible for the project. In addition, inspect the Cloud Audit Logs for UpdateBucket admin activity events to see who last changed the retention days and when.
Next, verify these three areas with the project owner and your compliance or legal teams:
- Regulatory and contractual frameworks: Confirm whether the project processes data governed by PCI-DSS, HIPAA, SOX, GDPR, or specific customer contracts. These frameworks often mandate keeping audit trails for a year or longer, which overrides a general internal engineering policy.
- Active legal holds and security investigations: Check with your legal and security operations teams to ensure the project is not under an active litigation hold or forensic review.
- Downstream dependencies and recovery needs: Determine whether teams query this bucket through Log Analytics and linked BigQuery datasets, or if logs are already exported via a Logs Router sink to cold Cloud Storage archives. If a cheaper archival sink already satisfies the compliance rule, the active log bucket in Cloud Logging may not need the extended window.
If any of these areas remain unclear, pause and investigate further before touching the bucket configuration.
Set the bucket’s retention and check log storage charges
Once you confirm that no audit, legal, or operational requirement demands the longer duration, you can bring the bucket back into compliance. Follow a disciplined three-step process so your changes are tracked and verified.
Step 1: Confirm written sign-off
Document confirmation from the project owner and compliance contacts that no audit or legal requirement needs the extended window. If your team uses infrastructure as code, check whether the bucket is managed in Terraform or another pipeline so an automated deployment does not overwrite your manual fix.
Step 2: Set the bucket’s retention to the approved number of days
Update the log bucket so its retention matches your organization’s approved maximum days. You can edit the bucket on the Logs Storage page in the Google Cloud console, or run the Google Cloud CLI command:
gcloud logging buckets update BUCKET_ID --location=LOCATION --project=PROJECT_ID --retention-days=APPROVED_DAYS
Verify the change immediately by running gcloud logging buckets describe for that bucket and confirming the retentionDays field reflects your approved policy. If the bucket is managed via Terraform, update the retention_days argument in your google_logging_project_bucket_config resource and apply the plan.
Step 3: Check later billing for the log storage charge
Finally, verify the billing impact after the change takes effect. Open your Google Cloud Billing reports or query your BigQuery billing export over subsequent complete billed days. Filter the report by the specific project ID and the Cloud Logging storage and retention SKUs. Checking later billing confirms that the retention charge adjusts downward as the expired log entries age out of the bucket.
Conclusion
Fixing an out-of-policy Cloud Logging retention setting takes thirty seconds in the terminal, while explaining to an auditor why six months of access logs vanished takes considerably longer. Your billing export will show you which project and log bucket exceeded your approved retention maximum and what those complete billed days cost. Use that billing signal to start the conversation, confirm with legal and engineering owners that no compliance rule requires the extra history, update the bucket to your approved days, and check later billing to verify the result.
To maintain continuous visibility into your cloud storage expenses and ensure your logging configurations stay aligned with company policies, you can start your free Binadox trial to discover out-of-policy buckets instantly, or book a demo with our team to see how automated governance can streamline your cloud operations.