A Terraform state file opens as its resources, secrets masked
A .tfstate file (JSON) opens as its version, serial and Terraform version, then a table of resources: mode, type, name, provider, instance count and a few attributes. Source is one tap away.
- Masking: state holds secrets. An attribute value is shown only when its key is on a short exact allowlist of identifiers (
id,name,arn,region,instance_type…); every other value is••••••. Nested values are never shown. Outputs show their names, never their values; control characters are stripped from every cell. - Cap: 500 resources; the page says how many were left out. Over 5 MB, or a file that does not parse or has no
resourcesarray, keeps the source with one line why. - MCP:
read_fileon a.tfstatecarriesabout: {kind, version, serial, total, resources}(first 50, same masking). - Every string is escaped; no script, no dependency.
Code: src/web/render/tfstate.ts, src/web/render/kinds.ts. Test: test/render-tfstate.test.ts.