Skip to content
ArchFoundry Docs Open the canvas

Import Terraform state or a plan

Updated October 19, 2026Plans: Free, Pro, Enterprise

Overview

If you already run infrastructure with Terraform, ArchFoundry can draw it from your state file or from a plan. The file is parsed in your browser and is never uploaded, because a state file can hold secrets. The diagram shows each resource as a priced card, so you see what the stack costs at list prices.

Prerequisites

  • An ArchFoundry account. Signing in is needed only to save the result.
  • A Terraform state file (terraform.tfstate), or the output of terraform show -json for a state or a plan.

Steps

  1. Open the canvas and press Ctrl+I (⌘I on a Mac), or choose Import from Terraform in the command palette. The Import from Terraform window opens.
  2. Drag one or more state files onto Drop state files here, or click Choose files.
  3. If your state lives in a remote backend, run the command in the example below, paste its output under or paste the JSON, and click Read it.
  4. Read the summary. Services not yet in the price book are listed, drawn without a number rather than guessed at.
  5. Click Put it on the canvas. If an imported diagram is already open, click Update this diagram to redraw it, or Insert as new to keep both.

To see how it works before using your own file, click Try a sample account.

Example

This prints the current state as JSON, ready to paste. Run it in the folder where you run Terraform:

bash
terraform show -json > <your-state-file>.json

Change <your-state-file> to any name, then drop that file onto the import window, or open it and paste its contents. For a plan, run terraform show -json on the saved plan file instead.

Expected result: a diagram with one card per service, grouped by network, and a projected monthly price in the top bar. Several state files merge into one canvas: per-team states are combined, and different workspaces get their own boxes.

Verify it worked

  • The canvas shows a card for each resource Terraform manages.
  • A plan imports with a note that nothing in it is applied yet.
  • The diagram is listed in Architectures once you are signed in.

Troubleshooting

That selection mixes Terraform source with state files. Import .tf source and state files separately. They answer different questions.

Could not read that file. The file is not Terraform state or plan JSON. Check that you exported it with terraform show -json, or dropped the .tfstate itself.

A file is a snapshot. An import shows the state as it was when you exported it. To keep the diagram current, connect the account with Connect an AWS account (read-only) and draw it from there.

Your Terraform is in a repository, not a state file. Use Clone a repository in the same window. See Import Terraform from a GitHub repository.

Next steps