azurerm_storage_account cost estimation
A storage account for Blob, File, Queue, and Table services. Priced by service type, redundancy, access tier, and operations.
An azurerm_storage_account is a container for one or more of Azure's storage services: Blob Storage, File Storage, Queue Storage, and Table Storage. The account itself has no cost; you pay for what's stored and what flows through it.
Storage costs depend on three attributes. Account kind (StorageV2 is the modern default, BlockBlobStorage for higher-throughput blobs, FileStorage for premium files). Replication option (LRS, ZRS, GRS, GZRS, RA-GRS, RA-GZRS), with cross-region replication roughly doubling the price. And access tier (Hot, Cool, Cold, Archive for blobs), with Archive being ~80% cheaper than Hot but with hours-long retrieval times.
Per-GB-month rates for Blob Storage in cheap regions: - Hot: $0.018/GB-month - Cool: $0.01/GB-month - Cold: $0.0036/GB-month - Archive: $0.00099/GB-month
Operations are billed per 10,000 transactions, with different rates by access tier and operation type. Writes are more expensive than reads at every tier. Cool, Cold, and Archive tiers have early-deletion penalties: objects deleted before 30 days (Cool) or 180 days (Archive) are billed as if they were stored for the minimum.
Egress to the public internet is usage-based at standard Azure rates.
c3x reads the account kind, replication, and access tier from the Terraform resource. Storage size, operations, and egress require c3x-usage.yml.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "azurerm_storage_account" "main" {
name = "prodstorage"
resource_group_name = azurerm_resource_group.main.name
location = "eastus"
account_tier = "Standard"
account_replication_type = "LRS"
access_tier = "Hot"
blob_properties {
versioning_enabled = true
}
}
resource "azurerm_storage_management_policy" "main" {
storage_account_id = azurerm_storage_account.main.id
rule {
name = "archive-old-blobs"
enabled = true
filters {
blob_types = ["blockBlob"]
}
actions {
base_blob {
tier_to_cool_after_days_since_modification_greater_than = 30
tier_to_archive_after_days_since_modification_greater_than = 90
}
}
}
}Pricing dimensions
What you actually pay for when you provision azurerm_storage_account.
| Dimension | Unit | What's being charged |
|---|---|---|
| Blob storage (Hot) | per GB-month | Frequently-accessed data. Highest storage price but cheapest operations. $0.018/GB-month for LRS in eastus |
| Blob storage (Cool) | per GB-month | Infrequently-accessed data. Minimum 30-day retention. $0.01/GB-month |
| Blob storage (Archive) | per GB-month | Rarely-accessed data with hours-long retrieval times. Minimum 180-day retention. $0.00099/GB-month |
| Read operations | per 10,000 transactions | GetBlob and similar reads. Cheaper than writes. |
| Write operations | per 10,000 transactions | PutBlob and similar writes. More expensive than reads. |
| Data egress | per GB | Bandwidth out of Azure to the internet. First 100 GB/month free at the subscription level. |
| Cross-region replication (GRS, RA-GRS, GZRS) | multiplier | Geo-redundant replication roughly doubles the per-GB storage cost. |
Optimization tips
Common ways to reduce azurerm_storage_account cost without changing the workload.
Use lifecycle management to move cold data to Archive
Up to 95% on cold dataLogs, backups, and compliance data that won't be read for months belong in Archive (80% cheaper than Hot). A storage management policy can automate the tier transition. Watch the minimum retention windows.
Choose LRS or ZRS unless geo-redundancy is required
About 50% on storageGRS and RA-GRS roughly double storage cost for cross-region replication. Many workloads have application-level backup strategies (cross-account snapshots, off-Azure archives) that obviate need for cloud-level geo-redundancy.
Watch early-deletion penalties when archiving
Avoid surprise penalty chargesCool requires 30-day minimum storage. Cold requires 90 days. Archive requires 180 days. Deleting earlier still bills you for the minimum. Plan lifecycle policies to keep data through the floor.
Disable versioning if you don't need it
Workload-dependentBlob versioning charges for every version's storage. If your application doesn't require it, disable. Use soft delete for accidental-deletion protection without per-version costs.
FAQ
Does c3x model lifecycle policy transitions?
Yes. If azurerm_storage_management_policy is defined and you specify expected blob age distribution in c3x-usage.yml, c3x splits the per-GB cost across tiers based on the policy rules.
Why is Archive storage so cheap?
Archive is offline storage with multi-hour retrieval times and per-GB retrieval fees. It's right for compliance archives, backup-of-backups, and data you may never read. Cheap until you need to read it.
Are Azure Files and Blob priced the same?
No. File Storage has its own pricing tier (Standard or Premium) with different per-GB rates and operation costs. c3x detects file shares and applies the right tier.
What about Azure Data Lake Storage Gen2?
ADLS Gen2 is enabled by setting is_hns_enabled = true on the storage account. Pricing follows the same blob tier model but adds a small per-namespace operation fee. c3x picks up the HNS flag.
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 azurerm_storage_account.