From a62cff939edfeeb84188e6a23b86a2a3eba68e4e Mon Sep 17 00:00:00 2001 From: Krista LaFentres Date: Fri, 5 Nov 2021 15:26:22 -0500 Subject: [PATCH] Update documentation for state mv command to clarify use of backup and backup-out options --- website/docs/cli/commands/state/mv.html.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/website/docs/cli/commands/state/mv.html.md b/website/docs/cli/commands/state/mv.html.md index 7670ae7a4..2cf2f8cd6 100644 --- a/website/docs/cli/commands/state/mv.html.md +++ b/website/docs/cli/commands/state/mv.html.md @@ -73,10 +73,18 @@ only, `terraform state mv` also accepts the option [`-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 [the `local` state mv](/docs/language/settings/backends/local.html) only, -`terraform taint` also accepts the legacy options -[`-state`, `-state-out`, and `-backup`](/docs/language/settings/backends/local.html#command-line-arguments). +`terraform state mv` also accepts the legacy options +[`-state`, `-state-out`, `-backup`, and `-backup-out`](/docs/language/settings/backends/local.html#command-line-arguments). ## Example: Rename a Resource