azurerm_digital_twins_instance cost estimation
A managed IoT digital-twin graph, billed purely by usage — operations, messages, and query units, each per 1,000. 1M operations is ~$2.50; no standing fee.
An azurerm_digital_twins_instance hosts a live graph model of a physical environment (buildings, factories, fleets) for IoT solutions. It has no standing fee — cost is entirely usage across three meters, each priced per 1,000 units: operations (~$0.0025 per 1K), messages (~$0.0010 per 1K), and query units (~$0.0005 per 1K). 1M operations is ~$2.50/month.
It's an inexpensive, consumption-based service — the cost tracks how much your solution reads, writes, routes, and queries the twin graph. Operations (API calls against twins) are usually the dominant meter, with messages (events routed out via endpoints) and query units (complexity of twin queries) adding on. Even fairly active solutions stay in single-to-low-double-digit dollars; high cost only appears at very large twin graphs with heavy real-time querying.
The levers, where it matters: avoid unnecessary operations (batch reads/writes, cache twin state client-side rather than re-querying), keep queries efficient (fewer query units per query), and route only the messages you need to downstream endpoints.
c3x prices the instance from operation, message, and query-unit volumes as usage — all per 1,000 units — so projected cost can be modelled (it's $0 with no usage).
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "azurerm_digital_twins_instance" "main" {
name = "factory-twins"
resource_group_name = azurerm_resource_group.main.name
location = azurerm_resource_group.main.location
identity {
type = "SystemAssigned"
}
}Pricing dimensions
What you actually pay for when you provision azurerm_digital_twins_instance.
| Dimension | Unit | What's being charged |
|---|---|---|
| Operations | per 1K operations | API operations against the twin graph (reads/writes). Usually the dominant meter. $0.0025 per 1K → 1M operations = $2.50/month |
| Messages | per 1K messages | Events routed out via endpoints to downstream services. $0.0010 per 1K |
| Query units | per 1K query units | Query-execution cost; complex twin queries consume more query units. $0.0005 per 1K |
Sample C3X output
1M operations in a month (no messages/queries):
azurerm_digital_twins_instance.main
└─ Operations 1,000 × 1K-op units $2.50
Monthly $2.50Optimization tips
Common ways to reduce azurerm_digital_twins_instance cost without changing the workload.
Batch and cache operations
Proportional to operations avoidedOperations are the dominant meter. Batch reads/writes and cache twin state client-side rather than re-querying the graph for unchanged data — fewer operations directly cuts the (small) bill.
Keep queries efficient
Per query unit reducedQuery cost is in query units, and complex queries consume more. Scope queries to the part of the graph you need rather than broad traversals, especially for frequent real-time queries.
Route only the messages you need
Per message routedMessages routed to endpoints bill per 1K. Route only the events downstream services actually consume rather than fanning all twin changes out.
FAQ
How is Azure Digital Twins billed?
Purely by usage, with no standing fee — operations (~$0.0025 per 1,000), messages (~$0.0010 per 1,000), and query units (~$0.0005 per 1,000). 1M operations is ~$2.50/month. An idle instance costs nothing.
Is Azure Digital Twins expensive?
No — it's an inexpensive consumption service. Cost tracks how much you read, write, route, and query the twin graph, with operations usually dominant. Even active solutions stay in low double digits; high cost only appears at very large graphs with heavy real-time querying.
How does c3x estimate the cost?
It's usage-driven, so c3x models it from operation, message, and query-unit volumes in c3x-usage.yml (each per 1,000 units). With no usage supplied, the instance estimates at $0.
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_digital_twins_instance.