AzureAzure Database for MariaDBDatabase

azurerm_mariadb_server cost estimation

A managed MariaDB server billed per vCore plus storage. A 2-vCore server with 50 GB is ~$182/month — but the service is retiring, so plan a migration.

An azurerm_mariadb_server is a managed MariaDB database. Cost is per vCore-hour (~$0.121/vCore-hour on the General Purpose tier) plus storage (~$0.115/GB-month). A 2-vCore server with 50 GB is ~$176.66 compute + $5.75 storage ≈ $182/month, with high availability roughly doubling compute by adding a standby.

The most important thing to know is that Azure Database for MariaDB is being retired. Microsoft has announced end of life, steering workloads to Azure Database for MySQL Flexible Server, which has a similar cost model (per vCore + storage) with more tiers, better burstable options, and stop/start support. For any existing MariaDB server, migration planning is the real decision.

Within the runtime cost, the usual database levers apply: right-size vCores to load, skip HA where you don't need a standby, and right-size storage. But the strategic move is migrating off the retiring service rather than optimizing it in place.

c3x prices the server from its vCores and storage, so the monthly cost is visible — useful for comparing against the MySQL Flexible Server target.

Terraform example

A minimal but realistic configuration that C3X can estimate.

resource "azurerm_mariadb_server" "db" {
  name                = "app-mariadb"
  location            = azurerm_resource_group.main.location
  resource_group_name = azurerm_resource_group.main.name

  sku_name   = "GP_Gen5_2"
  storage_mb = 51200
  version    = "10.3"

  administrator_login          = "mariadbadmin"
  administrator_login_password = var.db_password
}

Pricing dimensions

What you actually pay for when you provision azurerm_mariadb_server.

DimensionUnitWhat's being charged
MariaDB computeper vCore-hourPer vCore-hour on the chosen tier, billed continuously. HA roughly doubles it with a standby.
$0.121/vCore-hour → 2 vCores ≈ $176.66/month
Storageper GB-monthProvisioned storage, billed per GB-month.
$0.115/GB-month → 50 GB = $5.75/month

Sample C3X output

A 2-vCore General Purpose server with 50 GB storage, 24/7:

azurerm_mariadb_server.db
├─ MariaDB compute (2 vCore)   1460 vCore-hours   $176.66
└─ Storage                     50 GB-month          $5.75
                               Monthly            $182.41

Optimization tips

Common ways to reduce azurerm_mariadb_server cost without changing the workload.

Plan migration to MySQL Flexible Server

Access to cheaper Flexible Server tiers

Azure Database for MariaDB is retiring. Migrate to Azure Database for MySQL Flexible Server, which has a similar per-vCore + storage model plus burstable tiers, stop/start, and better reserved pricing. This is the strategic cost decision, not in-place tuning.

Right-size vCores

Difference between vCore counts/tiers

Compute scales with vCores. Monitor CPU/memory and step down over-provisioned servers; the burstable tier (on Flexible Server) suits dev and low-traffic databases for far less.

Skip HA where you don't need it

~$177/month (doubled compute) on a 2-vCore server

High availability adds a standby that roughly doubles compute. Use it for production that can't tolerate failover downtime; skip it on dev/test and non-critical databases.

Right-size storage

Per GB-month avoided

Storage bills per provisioned GB. Provision to actual data size with headroom rather than over-allocating; storage can be grown later.

FAQ

How is Azure Database for MariaDB billed?

Per vCore-hour (~$0.121 on General Purpose) plus storage (~$0.115/GB-month). A 2-vCore server with 50 GB is ~$182/month; HA roughly doubles compute by adding a standby.

Isn't Azure Database for MariaDB being retired?

Yes — Microsoft has announced its end of life, steering workloads to Azure Database for MySQL Flexible Server (similar cost model, more tiers, stop/start, burstable options). Existing MariaDB servers should plan migration; that's the key decision beyond runtime cost.

How does c3x estimate the cost?

From vcores and storage_mb, pricing compute per vCore-hour and storage per GB-month — useful for comparing the current server against a MySQL Flexible Server migration target.

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_mariadb_server.