azurerm_service_plan cost estimation
The compute plan that hosts Web Apps and Function Apps, billed per instance-hour by tier × worker count. A B1 plan with one worker is ~$12/month.
An azurerm_service_plan is the modern resource for an App Service plan — the compute that Web Apps, API Apps, and Function Apps run on. (It replaced the older azurerm_app_service_plan.) Cost is per instance-hour at the plan's tier rate × the worker (instance) count: a Basic B1 plan with one worker is ~$0.017/hour, ~$12.41/month; Standard S1 is ~$70/month; Premium P1v3 ~$120+/month.
The defining cost fact, as with any App Service plan, is that you pay for the plan, not the apps — multiple Web Apps and Function Apps can share one plan at no additional compute charge. So the common overspend is a separate plan per app, multiplying the per-instance fee for capacity that sits mostly idle. Consolidating low-traffic apps onto a shared plan is the biggest lever.
The other decisions are tier (pick the lowest with the features you need — Free/Shared for experiments, Basic for dev, Standard for autoscale/slots, Premium v3 for performance/VNet) and instance count (use autoscale rather than a fixed peak count). Premium v3 is reservable for steady production.
c3x prices the plan from sku_name and worker_count, so the per-instance cost and the effect of scaling out are visible before deployment.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "azurerm_service_plan" "main" {
name = "app-plan"
resource_group_name = azurerm_resource_group.main.name
location = azurerm_resource_group.main.location
os_type = "Linux"
sku_name = "B1"
worker_count = 1
}Pricing dimensions
What you actually pay for when you provision azurerm_service_plan.
| Dimension | Unit | What's being charged |
|---|---|---|
| App Service plan | per instance-hour | Tier rate × worker (instance) count, billed continuously. Apps on the plan share its compute at no extra charge. $0.017/hour for B1 → 1 worker ≈ $12.41/month; S1 ~$70, P1v3 ~$120+ |
Sample C3X output
A Basic B1 plan with one worker:
azurerm_service_plan.main
└─ App Service plan (B1 × 1) 730 hours $12.41
Monthly $12.41Optimization tips
Common ways to reduce azurerm_service_plan cost without changing the workload.
Share one plan across multiple apps
Per avoided planYou pay for the plan, not the apps — many Web Apps and Function Apps share a plan's compute for free. The common overspend is a plan per app; consolidating low-traffic apps onto a shared plan is the biggest lever.
Right-size the tier
Difference between tiersPick the lowest tier with the feature you need: Basic for dev/custom domains, Standard for autoscale and staging slots, Premium v3 for performance and VNet. Paying Premium for a Standard workload is pure overspend.
Autoscale instead of a fixed worker count
Worker-hours during low loadStandard and Premium support autoscale. A plan pinned at peak worker_count pays for peak 24/7; autoscaling to demand pays for peak only when it happens.
Reserve Premium v3 and stop non-prod off-hours
30–55% reserved; ~60% off-hours on non-prodReserve steady Premium v3 plans (1-3 year) for 30-55% off, and stop or scale down dev/test plans nights and weekends.
FAQ
How is an Azure App Service Plan billed?
Per instance-hour at the tier rate × worker count, continuously — B1 with one worker is ~$12.41/month, S1 ~$70, P1v3 ~$120+. You pay for the plan; multiple apps share it at no extra compute charge.
Is azurerm_service_plan different from azurerm_app_service_plan?
It's the modern replacement — azurerm_service_plan supersedes the older azurerm_app_service_plan. The pricing model is the same: per-instance by tier, with apps sharing the plan.
How does c3x estimate the cost?
From sku_name and worker_count, pricing per-instance hours at the tier rate. Apps on the plan don't add compute cost; scaling out workers (or autoscaling) does.
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_service_plan.