azurerm_managed_disk cost estimation
A block storage disk for Azure VMs. Priced by disk type and tier (per-disk for Premium SSD, per-GB for Standard).
An azurerm_managed_disk is a network-attached block storage disk for Azure VMs. Pricing has a unique tier-based structure that differs from AWS EBS or GCP Persistent Disk.
Disk types and pricing models:
Standard HDD (storage_account_type = "Standard_LRS"): $0.05/GB-month. Right for backup, dev, infrequent access. Magnetic disks, lowest performance.
Standard SSD ("StandardSSD_LRS"): $0.075/GB-month. Right for non-production workloads needing SSD performance. Cheaper than Premium but with lower IOPS.
Premium SSD ("Premium_LRS"): tier-based pricing, not per-GB. Each tier (P1 through P80) has a fixed monthly cost and fixed IOPS/throughput. P10 (128 GB) is $19.71/month; P30 (1 TB) is $135/month. Choosing a tier larger than your data needs is wasted cost.
Premium SSD v2 ("PremiumV2_LRS"): per-GB plus per-provisioned-IOPS plus per-provisioned-MB/s. More flexible than Premium SSD. Right for workloads that need higher IOPS than the size tier provides.
Ultra Disk ("UltraSSD_LRS"): per-GB-month + per-IOPS-month + per-MB/s-month. Highest performance tier. Right for SAP HANA and other high-IOPS databases.
Zone-redundant variants (ZRS suffix) cost roughly 50% more for cross-zone redundancy.
Snapshots and disk reservations are separately billable resources.
c3x reads storage_account_type and disk_size_gb. For Premium SSD, it maps size to the appropriate tier (P-tier). For Premium SSD v2 and Ultra, IOPS and throughput attributes come from the disk_iops_read_write and disk_mbps_read_write attributes.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "azurerm_managed_disk" "data" {
name = "data-disk"
resource_group_name = azurerm_resource_group.main.name
location = "eastus"
storage_account_type = "Premium_LRS"
create_option = "Empty"
disk_size_gb = 256
tags = {
Environment = "production"
}
}
resource "azurerm_virtual_machine_data_disk_attachment" "data" {
managed_disk_id = azurerm_managed_disk.data.id
virtual_machine_id = azurerm_linux_virtual_machine.api.id
lun = "10"
caching = "ReadWrite"
}Pricing dimensions
What you actually pay for when you provision azurerm_managed_disk.
| Dimension | Unit | What's being charged |
|---|---|---|
| Standard HDD | per GB-month | Magnetic storage. Cheapest tier. Right for backup or cold data. $0.05/GB-month for LRS |
| Standard SSD | per GB-month | SSD performance at lower cost than Premium. Per-GB pricing. $0.075/GB-month |
| Premium SSD | per disk tier per month | Tier-based: P1 through P80. Each tier has fixed IOPS, throughput, and price. Not per-GB. $19.71/month for P10 (128 GB), $135/month for P30 (1 TB) |
| Premium SSD v2 | per GB + per IOPS + per MB/s | Decoupled performance billing. Right when IOPS/throughput needs don't match tier sizes. |
| Ultra Disk | per GB + per IOPS + per MB/s | Highest performance tier. Right for SAP HANA, high-IOPS databases. |
Optimization tips
Common ways to reduce azurerm_managed_disk cost without changing the workload.
Choose Premium SSD tier carefully
Up to 50% per tier reductionPremium SSD pricing is tier-based, not per-GB. A 130 GB disk gets billed as P15 (256 GB) because it crossed the 128 GB threshold. Right-sizing to 128 GB or below saves a tier.
Use Standard SSD for non-production
About 67% on non-prodStandard SSD has 99% of the production performance of Premium SSD for typical web app workloads at one-third the cost. Right for dev/staging.
Migrate Premium SSD to Premium SSD v2 for high-IOPS workloads
Workload-dependentPremium SSD v2 lets you provision IOPS independently of capacity. For a 500 GB disk needing 10,000 IOPS, v2 is often cheaper than the P-tier required for those IOPS.
Delete unattached disks
100% of cost on stale disksDetached managed disks continue to bill. Audit periodically for orphaned disks from deleted VMs.
Use ZRS only for HA-critical disks
33% by choosing LRSZone-redundant storage costs 50% more. For application-replicated data (Cassandra, Postgres replicas), LRS is sufficient. ZRS is right for stateful systems without app-level redundancy.
FAQ
Why is Premium SSD pricing tier-based?
Azure prices Premium SSDs by performance tier, not by raw GB. Each tier (P1 through P80) bundles a specific size with specific IOPS and throughput. Stepping over a tier boundary jumps you to the next tier's full price even if you only needed slightly more capacity.
How does c3x handle Premium SSD tier mapping?
c3x reads disk_size_gb and maps it to the smallest P-tier that fits. For example, 130 GB maps to P15 (256 GB tier). The tier price is what c3x reports.
Premium SSD v2 vs Premium SSD?
v2 is newer and uses per-GB + per-IOPS + per-MB/s pricing. v1 is tier-based. v2 is often cheaper for workloads that need specific IOPS levels rather than just capacity. v1 is simpler but less flexible. New deployments should consider v2.
Do disks bill when the VM is stopped?
Yes. Managed disks bill continuously regardless of VM state. Only deleting the disk stops the charge.
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_managed_disk.