Update documentation for state mv command to clarify use of backup and backup-out options

This commit is contained in:
Krista LaFentres 2021-11-05 15:26:22 -05:00
parent c44c589f0a
commit a62cff939e
1 changed files with 10 additions and 2 deletions

View File

@ -73,10 +73,18 @@ only, `terraform state mv`
also accepts the option also accepts the option
[`-ignore-remote-version`](/docs/language/settings/backends/remote.html#command-line-arguments). [`-ignore-remote-version`](/docs/language/settings/backends/remote.html#command-line-arguments).
The legacy options [`-backup` and `-backup-out`](/docs/language/settings/backends/local.html#command-line-arguments)
operate on a local state file only. Configurations using
[the `remote` backend](/docs/language/settings/backends/remote.html)
must specify a local state file with the [`-state`](/docs/language/settings/backends/local.html#command-line-arguments)
option in order to use the [`-backup` and `-backup-out`](/docs/language/settings/backends/local.html#command-line-arguments)
options.
For configurations using For configurations using
[the `local` state mv](/docs/language/settings/backends/local.html) only, [the `local` state mv](/docs/language/settings/backends/local.html) only,
`terraform taint` also accepts the legacy options `terraform state mv` also accepts the legacy options
[`-state`, `-state-out`, and `-backup`](/docs/language/settings/backends/local.html#command-line-arguments). [`-state`, `-state-out`, `-backup`, and `-backup-out`](/docs/language/settings/backends/local.html#command-line-arguments).
## Example: Rename a Resource ## Example: Rename a Resource