azurerm_ machine_ learning_ compute_ cluster cost estimation
An autoscaling cluster for ML training and batch jobs. Priced on the underlying VM rate per node-hour, scaling between min and max nodes with the workload.
An azurerm_
The VM size sets the per-node rate (a Standard_
c3x reads the vm_
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "azurerm_machine_learning_compute_cluster" "train" {
name = "gpu-train"
machine_learning_workspace_id = azurerm_machine_learning_workspace.ml.id
location = "eastus"
vm_size = "Standard_DS3_v2"
vm_priority = "Dedicated"
scale_settings {
min_node_count = 0
max_node_count = 4
scale_down_nodes_after_idle_duration = "PT30M"
}
}Pricing dimensions
What you actually pay for when you provision azurerm_.
| Dimension | Unit | What's being charged |
|---|---|---|
| Node hours | per node-hour | Standard Azure VM rate for vm_ $0.27/hour for Standard_DS3_v2 |
| Scale-to-zero | min_node_count = 0 | With a minimum of zero, the cluster scales down between jobs and costs nothing while idle. |
Sample C3X output
Example output from c3x estimate (max 4 nodes, ~200 active hours/month):
azurerm_machine_learning_compute_cluster.train
└─ Node hours (DS3_v2, 4 x 200h) 800 node-hours $216.00
OVERALL TOTAL $216.00
(actual cost scales with real job hours)Optimization tips
Common ways to reduce azurerm_ cost without changing the workload.
Set min_ node_ count to 0
All idle node timeA non-zero minimum keeps nodes running and billing between jobs. With min 0, the cluster scales to zero when idle, so you pay only for actual training time. This is the single biggest lever.
Use low-priority (Spot) nodes for interruptible jobs
60-90%Setting vm_
Tune scale-down idle duration
Post-job idle node timeA long scale_
FAQ
How does c3x estimate ML compute cluster cost?
It reads vm_
Does Azure ML add a markup over the VM price?
No. You pay the standard Azure VM rate for the cluster's nodes. The managed orchestration (scheduling, scaling, job management) is included at no extra per-node charge.
Why can an ML cluster cost nothing when idle?
With min_
How do GPU clusters change the cost?
GPU VM sizes (NC, ND, NV series) cost many times more per node-hour than CPU sizes. c3x prices whatever vm_
What's the difference from a compute instance?
A compute cluster autoscales for batch/training jobs and can scale to zero. An azurerm_
Related resources
More Azure 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_.