Terraform Resource Count Calculator
Calculate total managed resources across providers, combining managed resources and data sources.
Inputs
Resources managed via the AWS provider.
Resources managed via the Azure provider.
Resources managed via other providers (GCP, Kubernetes, DNS, etc.).
Read-only data source lookups referenced in the configuration.
Total Resources
215resources
Managed Resources
185resources
AWS Share
64.9%
Azure Share
21.6%
Other Providers Share
13.5%
Data Source Ratio
14.0%
Step by step
Managed resources total
120 + 40 + 25
= 185 resources
Total = managed + data sources
185 + 30
= 215 resources
How it works
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
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.
You might also need
- Terraform Drift CalculatorCommonly used together
- Terraform Workspace CalculatorCommonly used together
- Terraform Refresh Duration CalculatorCommonly used together
- Terraform Variable Size CalculatorCommonly used together
- Terraform Module Dependency CalculatorCommonly used together
- Terraform State Size CalculatorCommonly used together