Import
Overview
Imports existing infrastructure into terraform state, like terraform import. When it finishes or you cancel, Esc returns you to the screen you came from.
Screenshot

Interactive (TUI)
Import has no key on Home. Press n in State to import with the address under the cursor filled in.
Keybindings
| Key | Action | When |
|---|---|---|
Enter |
Submit the address, then the ID; an empty answer cancels | Prompt |
y / Y / Enter |
Confirm import | Confirming |
n / N / Esc |
Cancel | Confirming |
p |
Navigate to plan (not offered by standalone tfui import, which has no Plan) |
Done |
ctrl+r |
Retry | Error |
Esc |
Back to the screen you came from | Idle, Done, Error |
Flow
Prompts → Confirming → Loading → Done/Error
- tfui asks “Resource address:” (filled in when you came from State), then “Resource ID:”.
- It asks “Import <id> as <address>?”
- On
y, it runsterraform import <address> <id>. - When it finishes, the plan is marked stale: Plan re-plans the next time you open it.
Escreturns you to where you started;popens Plan instead.
Command Line (CLI)
tfui import <address> <id>
With a terminal attached, tfui asks for confirmation; a headless run imports without asking.
Exit codes: see CLI I/O contract.
Equivalence
| Goal | CLI | TUI |
|---|---|---|
| Import a resource | tfui import <address> <id> |
From state: n → Enter → type ID → Enter → y |
Related
- State Browser – browse resources and import from context
- Plan – see the effect of importing (resource now tracked)