azurerm_ mssql_ managed_ instance cost estimation
A fully managed SQL Server instance with near-100% engine compatibility. Priced per vCore-hour by service tier and hardware generation, plus included and overage storage.
An azurerm_
The dominant cost is compute, billed per vCore-hour. The rate depends on the service tier (General Purpose is the baseline; Business Critical adds local SSD and a built-in readable replica at roughly 2.7x the rate) and the hardware generation (Standard-series Gen5 is the common default). A managed instance has a minimum of 4 vCores, so even an idle instance has a real floor: 4 vCores of General Purpose Gen5 runs around $1,460/month before storage.
Storage is the second dimension. General Purpose includes 32 GB and then bills additional storage per GB-month; Business Critical includes storage with the compute. c3x reads the sku_
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "azurerm_mssql_managed_instance" "core" {
name = "core-sqlmi"
resource_group_name = azurerm_resource_group.db.name
location = "eastus"
sku_name = "GP_Gen5"
vcores = 8
storage_size_in_gb = 256
administrator_login = "sqladmin"
administrator_login_password = var.sqlmi_password
subnet_id = azurerm_subnet.sqlmi.id
license_type = "BasePrice"
}Pricing dimensions
What you actually pay for when you provision azurerm_.
| Dimension | Unit | What's being charged |
|---|---|---|
| vCores (compute) | per vCore-hour | Per-vCore rate for the chosen tier and hardware generation. Business Critical is roughly 2.7x General Purpose. Minimum 4 vCores. c3x assumes 730 hours/month. $0.50/vCore-hour for General Purpose Gen5 |
| Included storage | 32 GB included | General Purpose includes 32 GB at no extra charge; storage beyond that bills per GB-month. |
| Overage storage | per GB-month | Provisioned storage above the included 32 GB. c3x prices the difference between storage_ $0.115/GB-month |
| Backup storage | per GB-month | Point-in-time and long-term retention backups beyond the included allowance. Usage-based; define expected retention in c3x-usage.yml to model it. |
Sample C3X output
Example output from c3x estimate for the Terraform above:
azurerm_mssql_managed_instance.core
├─ Compute (GP_Gen5, 8 vCores) 5,840 vCore-hours $2,920.00
└─ Storage (beyond 32 GB included) 224 GB-month $25.76
OVERALL TOTAL $2,945.76Optimization tips
Common ways to reduce azurerm_ cost without changing the workload.
Apply Azure Hybrid Benefit if you own SQL Server licenses
30-40%Setting license_
Stay on General Purpose unless you need the BC features
Up to 60%Business Critical costs ~2.7x and is only worth it if you need the local-SSD latency or the built-in readable secondary. Many workloads run fine on General Purpose with zone redundancy.
Buy a reserved capacity term for steady instances
~30%A 1-year reserved capacity commitment on the vCores typically saves ~30% over pay-as-you-go, 3-year more. Model with purchaseOption in c3x-usage.yml.
FAQ
How does c3x price an Azure SQL Managed Instance?
It reads sku_
Why is Managed Instance so much more expensive than a single Azure SQL Database?
Managed Instance has a 4-vCore minimum and runs a full SQL Server engine inside your VNet, so even a small instance starts around $1,460/month. A single azurerm_
Does the estimate include the SQL Server license?
Yes. The default BasePrice license_
Is Business Critical priced differently?
Yes. Set sku_
How is storage billed?
General Purpose includes 32 GB; c3x bills only the provisioned storage above that at the per-GB-month rate. Business Critical bundles storage into the compute price.
Related resources
More Azure resources
Further reading
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_.