Count total managed resources across Terraform modules, workspaces and environments.
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.
total = managed_aws + managed_azure + managed_other + 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.
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.
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.
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.