google_storage_bucket cost estimation
Object storage on GCS. Priced by storage class, region, operations, and egress. Lifecycle rules can auto-tier cold data.
A google_storage_bucket is a container for objects in Google Cloud Storage. The bucket itself is free; you pay for storage, operations, retrieval, and egress.
Storage classes determine per-GB-month rate:
Standard ($0.020/GB-month in us regions): right for frequently-accessed data and any data younger than 30 days.
Nearline ($0.010/GB-month): for data accessed less than once a month. 30-day minimum storage.
Coldline ($0.004/GB-month): for data accessed less than once a quarter. 90-day minimum.
Archive ($0.0012/GB-month): for data accessed less than once a year. 365-day minimum.
Bucket location matters too: regional buckets are cheapest, multi-regional (us, eu, asia) cost more but replicate across regions. Dual-regional sits in between.
Operations are billed per 10,000 requests. Class A operations (writes, lists) are more expensive than Class B (reads). Each class has different rates by storage tier; Archive Class A operations cost ~10x what Standard Class A do.
Retrieval fees apply to Nearline, Coldline, and Archive when you read data: $0.01/GB to $0.05/GB. Important: deleting an object before its minimum storage duration triggers the early-deletion fee equivalent to the remaining minimum.
Egress is usage-based by destination (cheapest: same region; most expensive: cross-continent).
c3x reads location and storage_class from the bucket. Storage size, ops, and egress need c3x-usage.yml.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "google_storage_bucket" "logs" {
name = "production-logs"
location = "US-CENTRAL1"
storage_class = "STANDARD"
uniform_bucket_level_access = true
lifecycle_rule {
condition {
age = 30
}
action {
type = "SetStorageClass"
storage_class = "NEARLINE"
}
}
lifecycle_rule {
condition {
age = 90
}
action {
type = "SetStorageClass"
storage_class = "COLDLINE"
}
}
lifecycle_rule {
condition {
age = 365
}
action {
type = "Delete"
}
}
}Pricing dimensions
What you actually pay for when you provision google_storage_bucket.
| Dimension | Unit | What's being charged |
|---|---|---|
| Storage (Standard) | per GB-month | Hot-access objects. No retrieval fee. $0.020/GB-month in us-central1 |
| Storage (Nearline) | per GB-month | Infrequent access. 30-day minimum. $0.010/GB-month |
| Storage (Coldline) | per GB-month | Quarterly access. 90-day minimum. $0.004/GB-month |
| Storage (Archive) | per GB-month | Annual access. 365-day minimum. $0.0012/GB-month |
| Class A operations (writes, lists) | per 10,000 operations | Most expensive operation class. |
| Class B operations (reads, metadata) | per 10,000 operations | Cheaper than writes. |
| Retrieval fees (Nearline+) | per GB | Charged when reading objects from non-Standard classes. $0.01-$0.05/GB by class |
| Egress to internet | per GB | Bytes leaving Google's network. Tiered by destination. |
Optimization tips
Common ways to reduce google_storage_bucket cost without changing the workload.
Use lifecycle rules to auto-tier cold data
50-94% on storageA lifecycle rule that moves objects from Standard to Nearline after 30 days saves 50%. Coldline after 90 days saves another 60%. Archive after a year drops to near-zero per-GB cost.
Use regional buckets unless you specifically need multi-region
50-100%Multi-regional buckets are 50-100% more per GB than regional. For most application data, regional is fine and you can replicate to another region with Storage Transfer Service if needed.
Don't store frequently-accessed data in Nearline or below
Avoid retrieval fee surprisesRetrieval fees apply on every read from non-Standard classes. A bucket of frequently-read objects in Nearline can be more expensive than Standard due to retrieval. Audit access patterns.
Use Object Lifecycle to delete old objects
Bounds long-term storage growthA delete-after-365-days lifecycle rule prevents data accumulation. Combined with backups, this caps storage at a known maximum.
FAQ
Are Class A operations expensive?
Relatively. At Standard tier, Class A is roughly 5x Class B. The bigger gotcha is at Archive tier, where Class A operations cost 100x what Standard Class A costs ($0.50 per 10K vs $0.05). Be careful with bulk writes to Archive.
How does c3x handle lifecycle rules?
c3x reads lifecycle_rule blocks and shifts storage class assumptions based on age. If you specify the average object age in c3x-usage.yml, c3x computes the weighted cost across tiers.
What about early-deletion fees?
Objects deleted before their minimum storage duration (30/90/365 days for Nearline/Coldline/Archive) are billed for the remaining time. c3x doesn't model early deletion; design your lifecycle to keep objects past the floor.
Is the GCS free tier worth modeling?
Yes for small workloads. GCS has 5 GB of Standard storage and 5,000 Class A and 50,000 Class B operations per month free at the account level. c3x can apply this via account-level free tier settings.
Related resources
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_storage_bucket.