Resource Mapping
Resource Mapping explains how entries in a state file become rows in the resource inventory.
What is counted
| Rule | Behaviour |
|---|---|
mode | Only managed resources are counted; data sources are ignored |
| Instances | Each element of instances counts as one resource, so count and for_each expansions are exact |
| Type | The Terraform type (for example aws_s3_bucket) is matched to a cloud service in the dataset |
| Unmatched types | Skipped, and listed in tfstate_manifest.json under unmapped_types |
Terraform types with no matching service are usually glue resources that do not represent billable infrastructure — aws_s3_bucket_versioning and azurerm_storage_container are typical examples. Seeing them in the manifest is expected.
Location resolution
Each instance is assigned a location using the first rule that produces a value:
| Order | Source | Notes |
|---|---|---|
| 1 | region attribute (AWS) or location attribute (Azure) | Lowercased and trimmed |
| 2 | The resource’s own arn | AWS only; the region is field 4 of the ARN |
| 3 | unknown | Nothing usable was found |
AWS providers only write region onto a few resource types, so most AWS resources resolve through their ARN. Referenced ARNs such as stream_arn or kms_key_arn are never used — they can point at a resource in another region or account.
Global services such as IAM and Route53 carry no region in their ARNs and are grouped under unknown.