Skip to content
ENExplore Calculators

Terraform Resource Count Calculator

Count total managed resources across Terraform modules, workspaces and environments.

About Terraform Resource Count Calculator

Total Terraform footprint combines actively managed resources (things Terraform creates, updates and destroys) with data sources (read-only lookups of existing infrastructure). Formula: total = managed + data_sources. Breaking managed resources down per-provider shows where infrastructure complexity concentrates, which is useful for prioritizing module refactors or provider version upgrade risk.

Formula

total = managed_aws + managed_azure + managed_other + data_sources

managed_aws
AWS provider managed resources
managed_azure
Azure provider managed resources
managed_other
Other provider managed resources
data_sources
Read-only data source lookups

Worked example

With the default values below, Terraform Resource Count Calculator returns Total Resources of 215. Change any input above and every figure here is recalculated in your browser.

Inputs used

Managed Resources — AWSaccepts 0–10,000,000 resources
120 resources
Managed Resources — Azureaccepts 0–10,000,000 resources
40 resources
Managed Resources — Other Providersaccepts 0–10,000,000 resources
25 resources
Data Sourcesaccepts 0–10,000,000 data sources
30 data sources

Results

Total Resources
215 resources
Managed Resources
185 resources
AWS Share
64.9%
Azure Share
21.6%
Other Providers Share
13.5%
Data Source Ratio
14.0%

Step by step

  1. 1Managed resources total= 185 resources
  2. 2Total = managed + data sources= 215 resources

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 1 decimal place, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Why separate managed resources from data sources?

Data sources don't get created, updated or destroyed by Terraform — they're read-only lookups (e.g. `data "aws_ami"`). Counting them separately avoids overstating your actual managed infrastructure footprint.

How do I get this breakdown from a real state file?

Run `terraform state list` and parse resource addresses by their `provider.resource_type` prefix, or use `terraform show -json` and aggregate programmatically by the `provider_name` field.

Does a high data source ratio indicate a problem?

Not inherently — heavy use of data sources is common in configurations that reference shared/pre-existing infrastructure (VPCs, AMIs, shared IAM roles) rather than owning everything end-to-end.

How does provider concentration affect risk?

A provider holding a large share of your resources means a provider version upgrade, API deprecation, or outage there has outsized blast radius — worth tracking alongside module dependency depth.

Terraform Resource Count Calculator | Calcrivo