azurerm_ application_ gateway cost estimation
A Layer 7 load balancer with WAF support. Priced by gateway hours, capacity units, and optional WAF tier.
An azurerm_
Gateway hours: a flat hourly rate by SKU. Standard_
Capacity units: in addition to gateway hours, you pay per capacity unit consumed. A capacity unit roughly represents 50 connections per second, 2,500 active connections, 2.22 Mbps throughput, or 1 compute unit (whichever is highest). Standard_
The bill = gateway-hour rate + CU consumption. For a small Application Gateway handling ~100 requests/second, the CU charges are roughly $50-100/month on top of the $180 base.
WAF policies (azurerm_
Data transfer follows standard Azure rules: free within the same region/VNet, charged for egress.
Autoscaling capacity (min_
c3x reads sku.name and sku.tier. Request volume drives CU consumption and requires c3x-usage.yml entries.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "azurerm_application_gateway" "main" {
name = "production-appgw"
resource_group_name = azurerm_resource_group.main.name
location = "eastus"
sku {
name = "Standard_v2"
tier = "Standard_v2"
}
autoscale_configuration {
min_capacity = 2
max_capacity = 10
}
gateway_ip_configuration {
name = "config"
subnet_id = azurerm_subnet.appgw.id
}
frontend_port {
name = "https"
port = 443
}
frontend_ip_configuration {
name = "public"
public_ip_address_id = azurerm_public_ip.appgw.id
}
backend_address_pool {
name = "backend"
}
backend_http_settings {
name = "http"
cookie_based_affinity = "Disabled"
port = 8080
protocol = "Http"
request_timeout = 30
}
http_listener {
name = "listener"
frontend_ip_configuration_name = "public"
frontend_port_name = "https"
protocol = "Https"
ssl_certificate_name = "cert"
}
request_routing_rule {
name = "rule"
rule_type = "Basic"
http_listener_name = "listener"
backend_address_pool_name = "backend"
backend_http_settings_name = "http"
priority = 100
}
}Pricing dimensions
What you actually pay for when you provision azurerm_.
| Dimension | Unit | What's being charged |
|---|---|---|
| Standard_v2 gateway hours | per gateway-hour | Base hourly rate for the Standard v2 SKU. $0.246/hour ≈ $180/month |
| WAF_v2 gateway hours | per gateway-hour | Application Gateway with WAF enabled. Higher base rate. $0.443/hour ≈ $323/month |
| Capacity unit hours (Standard_v2) | per CU-hour | Variable capacity units consumed by traffic. Min capacity is your floor. $0.008/CU-hour |
| Capacity unit hours (WAF_v2) | per CU-hour | Higher per-CU rate because of WAF processing overhead. |
| Data transfer out | per GB | Standard Azure egress rates for traffic leaving Azure. |
Optimization tips
Common ways to reduce azurerm_ cost without changing the workload.
Use Standard_ v2 unless you specifically need WAF
About 45%WAF_
Set min_ capacity low for predictable workloads
Off-peak capacityMinimum capacity is your floor for billable CU. If your traffic spikes only during business hours, min_
Consolidate multiple apps on one Application Gateway
$180/month per consolidated gatewayApplication Gateway supports multiple listeners, multiple backend pools, and host-header-based routing. Three separate gateways at $180/month each can become one at $180 with negligible CU increase.
Use Azure Front Door for global edge instead
Workload-dependentFront Door is a global edge service with its own pricing model. For multi-region or global apps, Front Door is often cheaper than running Application Gateways in each region.
FAQ
Standard_ v2 or WAF_ v2?
WAF_
How does c3x estimate capacity unit consumption?
c3x reads min_
What about the older Standard and WAF SKUs (without v2)?
Deprecated. The non-v2 SKUs have lower base hourly rates but lack autoscaling, zone redundancy, and other v2 features. AWS is migrating users to v2; new deployments should always use v2.
Does the public IP cost extra?
Yes. The associated azurerm_
Related resources
More Azure resources
Further reading
- Azure Application Gateway vs Load Balancer cost: L7 vs L4
Load Balancer (L4) is ~$25-40/month; Application Gateway (L7) starts ~$180/month plus capacity units. Here's what the gap buys, when you need L7, and how to avoid defaulting to the pricier option.
- Azure Application Gateway v2 cost: fixed fees plus capacity units
Application Gateway v2 bills a fixed hourly fee plus capacity units that scale with traffic, and the WAF-enabled SKU costs noticeably more. Here is how the pricing works and when a simpler load balancer is cheaper.
- WAF cost compared: AWS WAF vs Azure vs Cloud Armor
AWS WAF charges per web ACL, per rule, and per million requests; Azure WAF and GCP Cloud Armor bundle differently (policy plus per-rule plus requests). The cheapest depends on rule count and traffic. This compares the models.
- Load balancer cost compared: AWS vs Azure vs GCP
AWS (ALB/NLB), Azure (Load Balancer, Application Gateway), and GCP (Cloud Load Balancing) price load balancing on hourly plus capacity/data axes. Layer-4 is cheaper than layer-7. This compares them and the shared choice of layer to your needs.
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_.