google_logging_project_bucket_config cost estimation
A bucket for storing GCP logs. Ingestion is $0.50/GiB beyond the free tier; storage beyond 30 days is $0.01/GiB-month.
A google_logging_project_bucket_config configures a log bucket where Cloud Logging stores logs. Cloud Logging is one of the cost surprises in GCP for high-traffic workloads.
Pricing components:
Log ingestion: $0.50/GiB ingested. The first 50 GiB/month is free at the project level (the _Default bucket).
Log storage beyond retention: standard log retention is 30 days. Logs kept past the bucket's configured retention period cost $0.01/GiB-month.
Log routing: free. Sinks to BigQuery, Pub/Sub, Cloud Storage, and other GCP destinations have no Cloud Logging routing fee. The destination's own storage/processing fees apply.
GKE workload logs: a major cost driver. A standard GKE cluster can generate 5-30 GiB/day depending on workload verbosity. At $0.50/GiB, that's $75-450/month per cluster in log ingestion alone, before any custom application logs.
VPC Flow Logs (if enabled at the subnet level): similar magnitude. Multi-AZ VPCs with high traffic can produce gigabytes per day.
Cloud Logging Bucket types:
_Default: the default bucket every project has. 30-day retention, no charge for the bucket itself, but ingestion bills.
_Required: stores Admin Activity logs and Cloud Billing accounts for 400 days. Free.
User-defined: custom buckets you create for different retention periods, regions, or CMEK. Same per-GiB pricing.
c3x estimates Cloud Logging based on expected ingestion via c3x-usage.yml. Without that, logs appear as $0 with a "depends on usage" note.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "google_logging_project_bucket_config" "production" {
project = var.project_id
location = "global"
retention_days = 90
bucket_id = "production-logs"
description = "Production application logs"
}
resource "google_logging_project_sink" "to_bigquery" {
name = "logs-to-bigquery"
destination = "bigquery.googleapis.com/projects/${var.project_id}/datasets/logs"
filter = "resource.type="k8s_container" AND severity >= ERROR"
unique_writer_identity = true
}Pricing dimensions
What you actually pay for when you provision google_logging_project_bucket_config.
| Dimension | Unit | What's being charged |
|---|---|---|
| Log ingestion | per GiB | Every GiB ingested into Cloud Logging. First 50 GiB/month free at project level. $0.50/GiB |
| Log storage beyond retention | per GiB-month | Logs retained beyond the bucket's retention period. $0.01/GiB-month |
| Log routing (sinks) | free | Routing logs to BigQuery, Pub/Sub, Cloud Storage incurs no Cloud Logging fee. Destination storage/processing applies. $0 |
| Log Analytics queries (when enabled) | per GiB queried | Optional analytics-mode bucket: $0.05/GiB queried plus storage at $0.04/GiB-month. Right for log analytics workloads. |
Optimization tips
Common ways to reduce google_logging_project_bucket_config cost without changing the workload.
Filter out high-volume low-value logs
Up to 80% on chatty workloadsCloud Logging supports exclusion filters that drop logs before they're ingested. Common candidates: GKE health probes, debug logs in production, repetitive informational logs.
Use log sinks to BigQuery for analytics, drop from Logging
Storage costIf you need to keep logs for analytics, route to BigQuery (cheaper at $0.02/GB-month storage) via a sink AND set exclusion in the source so the logs don't also persist in Cloud Logging.
Set short retention for high-volume logs
Long-term storageDefault _Default retention is 30 days (free). For most non-critical logs, that's plenty. Avoid extending retention unless required.
Use BigQuery for cold log archive
Workload-dependentBigQuery storage at $0.02/GB-month is cheaper than Cloud Logging storage at $0.01/GiB-month for compliance archive. Plus BigQuery supports SQL queries.
Disable VPC Flow Logs in dev environments
Major in non-prodVPC Flow Logs generate substantial volume. For non-production VPCs without security requirements, disable them and rely on Cloud Logging's audit events.
FAQ
Why is Cloud Logging so expensive?
Two reasons. The per-GiB ingestion rate ($0.50) is high compared to S3. And GKE/VPC workloads generate enormous volumes (5-30 GiB/day per cluster). Filtering at the source is the main mitigation.
Does c3x estimate Cloud Logging from Terraform?
The bucket resource is free. Cost comes from ingestion volume which is usage-based. Specify monthly_data_ingested_gb in c3x-usage.yml on the bucket for a meaningful estimate.
Are log sinks really free?
The routing operation itself is free. You pay for the destination (BigQuery storage, Pub/Sub messages, GCS storage). Routing is one-way: logs are still also stored in their source bucket unless you exclude them.
What about Cloud Logging for AKS or EKS-on-GKE setups?
Cross-cloud setups bill the same way: ingestion is per-GiB regardless of source. The 50 GiB free tier still applies. For multi-cloud observability, consider whether Cloud Logging is the right central store or whether a separate observability platform (Grafana Cloud, Datadog, etc.) is cheaper.
Related resources
google_container_clusterGKE workloads write logs to Cloud Logging
google_bigquery_datasetCommon log sink destination for analytics
google_storage_bucketCheaper archive destination
aws_cloudwatch_log_groupAWS equivalent (CloudWatch Logs)
azurerm_log_analytics_workspaceAzure equivalent (Log Analytics)
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including google_logging_project_bucket_config.