Skip to content

tfcensus move plan ​

plan reads each involved unit's state from S3, applies the block in memory and plans every unit against its new state through a local backend override (_tfcensus_override.tf), with its own credentials. A surgery block passes when every resource change is no-op or read; output changes don't count. Blocks run in order, so a later block sees an earlier one's result.

A native block only lists the files apply would write.

Exit codes: 3 when a block is rejected (MV-VERIFY, MV-PLAN, MV-ACCOUNT or MV-VERSIONING), 4 when the backend credentials fail, and 2 for a file or flag error.

Usage ​

sh
tfcensus move plan <migration-file> [flags]

Arguments ​

ArgumentRequiredRepeatable
migration-fileyesno

Flags ​

FlagDescriptionTypeDefaultValuesConfig keyNotes
--blockrun only these blocks (default: all, in file order)list, repeatable
--reporepository root that the file's unit paths are relative tostring.
--varset var.NAME in the migration file, as NAME=VALUEstring, repeatable

The global flags work with every command.

Output formats ​

--format accepts tty, plain, json, sarif. Without it, the format is tty when stdout is a terminal and plain otherwise. Formats are described on the global flags page.

Exit codes ​

CodeMeaning
0The command finished. With --fail-on, nothing matched.
1The command failed: a read, a write, a child process or a check failed.
2Wrong usage: an unknown command or flag, a bad value or argument, an invalid config file, or a prompt with no terminal.
3A --fail-on gate matched. The report is still written.
4Credentials were missing or rejected for every source the command needed.
130Interrupted by Ctrl-C (SIGINT) or a cancelled context.

All codes are listed on the exit codes page.

Examples ​

sh
tfcensus move plan migrations/split_network.hcl
tfcensus move plan migrations/split_network.hcl --block split_network --var env=prod