azurerm_route cost estimation
A route is free. A single user-defined route in a route table costs nothing. The cost is whatever paid next hop the route directs traffic toward.
An azurerm_route is one user-defined route inside a route table, defining a destination prefix and the next hop for matching traffic. The route is free. Azure does not charge for individual routes or for the route table that holds them.
The cost of a route is entirely a function of its next hop. A route with a next hop type of VirtualAppliance sends traffic to a network virtual appliance or Azure Firewall that bills hourly plus per-GB processing. A next hop toward internet egress through a NAT Gateway anchors that gateway's charges. A route with a next hop of VnetPeering or VirtualNetworkGateway can pull traffic across a peered or hybrid link that is metered per GB. A next hop of None simply drops traffic and costs nothing. The route is a rule; the price is paid by the resource on the other end of it.
Managing routes individually with azurerm_route is useful when you compose a table from several modules, but the cost model is identical to defining the routes inline in the route table. c3x prices the appliances, gateways, and cross-boundary transfer a route directs traffic to and treats the route itself as free.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "azurerm_resource_group" "main" {
name = "network-rg"
location = "eastus"
}
resource "azurerm_route_table" "egress" {
name = "egress-rt"
resource_group_name = azurerm_resource_group.main.name
location = azurerm_resource_group.main.location
}
resource "azurerm_route" "default" {
name = "to-firewall"
resource_group_name = azurerm_resource_group.main.name
route_table_name = azurerm_route_table.egress.name
address_prefix = "0.0.0.0/0"
next_hop_type = "VirtualAppliance"
next_hop_in_ip_address = "10.0.0.4"
}Pricing dimensions
What you actually pay for when you provision azurerm_route.
| Dimension | Unit | What's being charged |
|---|---|---|
| Route | free | A single user-defined route in a route table has no charge. $0 |
| Next-hop appliance or gateway | per hour + per GB (billed elsewhere) | The Azure Firewall, NVA, NAT Gateway, or gateway the route points at is billed on its own meter. |
| Traffic redirected across a link | per GB | Routes with a peering or gateway next hop can create metered cross-boundary transfer. |
Optimization tips
Common ways to reduce azurerm_route cost without changing the workload.
Confirm the next hop justifies its cost
A route sending all traffic to a firewall or NVA forces packets through a resource that bills hourly and per GB. Route only the traffic that truly needs inspection.
Use a None next hop to blackhole cheaply
To block a prefix, a route with next hop None drops traffic at no cost, avoiding the need to send it through a paid appliance for denial.
Keep egress routes regional
A route that directs traffic through a gateway in another region adds per-GB cross-region transfer. Point egress at a regional path where possible.
FAQ
Does an Azure route cost money?
No. Individual user-defined routes and the route table that holds them are free. Cost comes from the paid next hop a route directs traffic toward, such as a firewall, NVA, or gateway.
Is azurerm_route different in cost from an inline route?
No. Defining a route with azurerm_route or inline inside azurerm_route_table produces the same result and the same cost model. Both are free; the next hop is what bills.
How do I route traffic without paying for an appliance?
Use free service endpoints for PaaS traffic and a next hop of None to drop unwanted prefixes. Reserve VirtualAppliance next hops for traffic that genuinely needs firewall inspection.
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_route.