Skip to content

Commit

Permalink
Merge pull request #30235 from hashicorp/fix-remote-backend-references
Browse files Browse the repository at this point in the history
[WIP] Fix remaining remote backend references
  • Loading branch information
laurapacilio committed Jan 26, 2022
2 parents c849e61 + 9e28fc4 commit fb61a3d
Show file tree
Hide file tree
Showing 14 changed files with 106 additions and 134 deletions.
23 changes: 11 additions & 12 deletions website/docs/cli/commands/import.mdx
Expand Up @@ -38,36 +38,36 @@ behavior. For more information on this assumption, see

The command-line flags are all optional. The list of available flags are:

* `-config=path` - Path to directory of Terraform configuration files that
- `-config=path` - Path to directory of Terraform configuration files that
configure the provider for import. This defaults to your working directory.
If this directory contains no Terraform configuration files, the provider
must be configured via manual input or environmental variables.

* `-input=true` - Whether to ask for input for provider configuration.
- `-input=true` - Whether to ask for input for provider configuration.

* `-lock=false` - Don't hold a state lock during the operation. This is
- `-lock=false` - Don't hold a state lock during the operation. This is
dangerous if others might concurrently run commands against the same
workspace.

* `-lock-timeout=0s` - Duration to retry a state lock.
- `-lock-timeout=0s` - Duration to retry a state lock.

* `-no-color` - If specified, output won't contain any color.
- `-no-color` - If specified, output won't contain any color.

* `-parallelism=n` - Limit the number of concurrent operation as Terraform
- `-parallelism=n` - Limit the number of concurrent operation as Terraform
[walks the graph](/internals/graph#walking-the-graph). Defaults
to 10.

* `-provider=provider` - **Deprecated** Override the provider configuration to
- `-provider=provider` - **Deprecated** Override the provider configuration to
use when importing the object. By default, Terraform uses the provider specified
in the configuration for the target resource, and that is the best behavior in most cases.

* `-var 'foo=bar'` - Set a variable in the Terraform configuration. This flag
- `-var 'foo=bar'` - Set a variable in the Terraform configuration. This flag
can be set multiple times. Variable values are interpreted as
[literal expressions](/language/expressions/types) in the
Terraform language, so list and map values can be specified via this flag.
This is only useful with the `-config` flag.

* `-var-file=foo` - Set variables in the Terraform configuration from
- `-var-file=foo` - Set variables in the Terraform configuration from
a [variable file](/language/values/variables#variable-definitions-tfvars-files). If
a `terraform.tfvars` or any `.auto.tfvars` files are present in the current
directory, they will be automatically loaded. `terraform.tfvars` is loaded
Expand All @@ -76,11 +76,10 @@ The command-line flags are all optional. The list of available flags are:
the working directory. This flag can be used multiple times. This is only
useful with the `-config` flag.

For configurations using
[the `remote` backend](/language/settings/backends/remote)
For configurations using the [Terraform Cloud CLI integration](/cli/cloud) or the [`remote` backend](/language/settings/backends/remote)
only, `terraform import`
also accepts the option
[`-ignore-remote-version`](/language/settings/backends/remote#command-line-arguments).
[`-ignore-remote-version`](/cli/cloud/command-line-arguments#ignore-remote-version).

For configurations using
[the `local` backend](/language/settings/backends/local) only,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/cli/commands/push.mdx
Expand Up @@ -7,7 +7,7 @@ description: >-

# Command: push

!> **Important:** The `terraform push` command is no longer functional. Its functionality was replaced and surpassed by [the `remote` backend](/language/settings/backends/remote), which works with current versions of Terraform Cloud. The `remote` backend allows you to run remote operations directly from the command line, and displays real-time output from the remote run environment.
!> **Important:** The `terraform push` command is no longer functional. We recommend the [Terraform Cloud CLI integration](/cli/cloud) instead, which allows you to run remote operations in Terraform Cloud directly from the command line.

The `terraform push` command was an early implementation of remote Terraform runs. It allowed teams to push a configuration to a remote run environment in a discontinued version of Terraform Enterprise.

Expand Down
11 changes: 5 additions & 6 deletions website/docs/cli/commands/state/mv.mdx
Expand Up @@ -54,23 +54,22 @@ address.

This command also accepts the following options:

* `-dry-run` - Report all of the resource instances that match the given
- `-dry-run` - Report all of the resource instances that match the given
address without actually "forgetting" any of them.

* `-lock=false` - Don't hold a state lock during the operation. This is
- `-lock=false` - Don't hold a state lock during the operation. This is
dangerous if others might concurrently run commands against the same
workspace.

* `-lock-timeout=DURATION` - Unless locking is disabled with `-lock=false`,
- `-lock-timeout=DURATION` - Unless locking is disabled with `-lock=false`,
instructs Terraform to retry acquiring a lock for a period of time before
returning an error. The duration syntax is a number followed by a time
unit letter, such as "3s" for three seconds.

For configurations using
[the `remote` backend](/language/settings/backends/remote)
For configurations using the [Terraform Cloud CLI integration](/cli/cloud) or the [`remote` backend](/language/settings/backends/remote)
only, `terraform state mv`
also accepts the option
[`-ignore-remote-version`](/language/settings/backends/remote#command-line-arguments).
[`-ignore-remote-version`](/cli/cloud/command-line-arguments#ignore-remote-version).

The legacy options [`-backup` and `-backup-out`](/language/settings/backends/local#command-line-arguments)
operate on a local state file only. Configurations using
Expand Down
5 changes: 2 additions & 3 deletions website/docs/cli/commands/state/push.mdx
Expand Up @@ -40,8 +40,7 @@ Both of these safety checks can be disabled with the `-force` flag.
**This is not recommended.** If you disable the safety checks and are
pushing state, the destination state will be overwritten.

For configurations using
[the `remote` backend](/language/settings/backends/remote)
For configurations using the [Terraform Cloud CLI integration](/cli/cloud) or the [`remote` backend](/language/settings/backends/remote)
only, `terraform state push`
also accepts the option
[`-ignore-remote-version`](/language/settings/backends/remote#command-line-arguments).
[`-ignore-remote-version`](/cli/cloud/command-line-arguments#ignore-remote-version).
11 changes: 5 additions & 6 deletions website/docs/cli/commands/state/replace-provider.mdx
Expand Up @@ -24,19 +24,18 @@ of this command, backups are required.

This command also accepts the following options:

* `-auto-approve` - Skip interactive approval.
- `-auto-approve` - Skip interactive approval.

* `-lock=false` - Don't hold a state lock during the operation. This is
- `-lock=false` - Don't hold a state lock during the operation. This is
dangerous if others might concurrently run commands against the same
workspace.

* `-lock-timeout=0s` - Duration to retry a state lock.
- `-lock-timeout=0s` - Duration to retry a state lock.

For configurations using
[the `remote` backend](/language/settings/backends/remote)
For configurations using the [Terraform Cloud CLI integration](/cli/cloud) or the [`remote` backend](/language/settings/backends/remote)
only, `terraform state replace-provider`
also accepts the option
[`-ignore-remote-version`](/language/settings/backends/remote#command-line-arguments).
[`-ignore-remote-version`](/cli/cloud/command-line-arguments#ignore-remote-version).

For configurations using
[the `local` state rm](/language/settings/backends/local) only,
Expand Down
11 changes: 5 additions & 6 deletions website/docs/cli/commands/state/rm.mdx
Expand Up @@ -37,23 +37,22 @@ the old objects still present.

This command also accepts the following options:

* `-dry-run` - Report all of the resource instances that match the given
- `-dry-run` - Report all of the resource instances that match the given
address without actually "forgetting" any of them.

* `-lock=false` - Don't hold a state lock during the operation. This is
- `-lock=false` - Don't hold a state lock during the operation. This is
dangerous if others might concurrently run commands against the same
workspace.

* `-lock-timeout=DURATION` - Unless locking is disabled with `-lock=false`,
- `-lock-timeout=DURATION` - Unless locking is disabled with `-lock=false`,
instructs Terraform to retry acquiring a lock for a period of time before
returning an error. The duration syntax is a number followed by a time
unit letter, such as "3s" for three seconds.

For configurations using
[the `remote` backend](/language/settings/backends/remote)
For configurations using the [Terraform Cloud CLI integration](/cli/cloud) or the [`remote` backend](/language/settings/backends/remote)
only, `terraform state rm`
also accepts the option
[`-ignore-remote-version`](/language/settings/backends/remote#command-line-arguments).
[`-ignore-remote-version`](/cli/cloud/command-line-arguments#ignore-remote-version).

For configurations using
[the `local` state rm](/language/settings/backends/local) only,
Expand Down
20 changes: 9 additions & 11 deletions website/docs/cli/commands/taint.mdx
Expand Up @@ -35,31 +35,29 @@ The address is in
[the resource address syntax](/cli/state/resource-addressing) syntax,
as shown in the output from other commands, such as:

* `aws_instance.foo`
* `aws_instance.bar[1]`
* `aws_instance.baz[\"key\"]` (quotes in resource addresses must be escaped on the command line, so that they will not be interpreted by your shell)
* `module.foo.module.bar.aws_instance.qux`
- `aws_instance.foo`
- `aws_instance.bar[1]`
- `aws_instance.baz[\"key\"]` (quotes in resource addresses must be escaped on the command line, so that they will not be interpreted by your shell)
- `module.foo.module.bar.aws_instance.qux`

This command accepts the following options:

* `-allow-missing` - If specified, the command will succeed (exit code 0)
- `-allow-missing` - If specified, the command will succeed (exit code 0)
even if the resource is missing. The command might still return an error
for other situations, such as if there is a problem reading or writing
the state.

* `-lock=false` - Disables Terraform's default behavior of attempting to take
- `-lock=false` - Disables Terraform's default behavior of attempting to take
a read/write lock on the state for the duration of the operation.

* `-lock-timeout=DURATION` - Unless locking is disabled with `-lock=false`,
- `-lock-timeout=DURATION` - Unless locking is disabled with `-lock=false`,
instructs Terraform to retry acquiring a lock for a period of time before
returning an error. The duration syntax is a number followed by a time
unit letter, such as "3s" for three seconds.

For configurations using
[the `remote` backend](/language/settings/backends/remote)
only, `terraform taint`
For configurations using the [Terraform Cloud CLI integration](/cli/cloud) or the [`remote` backend](/language/settings/backends/remote) only, `terraform taint`
also accepts the option
[`-ignore-remote-version`](/language/settings/backends/remote#command-line-arguments).
[`-ignore-remote-version`](/cli/cloud/command-line-arguments#ignore-remote-version).

For configurations using
[the `local` backend](/language/settings/backends/local) only,
Expand Down
13 changes: 6 additions & 7 deletions website/docs/cli/commands/untaint.mdx
Expand Up @@ -43,29 +43,28 @@ identifying a particular resource instance which is currently tainted.

This command also accepts the following options:

* `-allow-missing` - If specified, the command will succeed (exit code 0)
- `-allow-missing` - If specified, the command will succeed (exit code 0)
even if the resource is missing. The command might still return an error
for other situations, such as if there is a problem reading or writing
the state.

* `-lock=false` - Don't hold a state lock during the operation. This is
- `-lock=false` - Don't hold a state lock during the operation. This is
dangerous if others might concurrently run commands against the same
workspace.

* `-lock-timeout=DURATION` - Unless locking is disabled with `-lock=false`,
- `-lock-timeout=DURATION` - Unless locking is disabled with `-lock=false`,
instructs Terraform to retry acquiring a lock for a period of time before
returning an error. The duration syntax is a number followed by a time
unit letter, such as "3s" for three seconds.

* `-no-color` - Disables terminal formatting sequences in the output. Use this
- `-no-color` - Disables terminal formatting sequences in the output. Use this
if you are running Terraform in a context where its output will be
rendered by a system that cannot interpret terminal formatting.

For configurations using
[the `remote` backend](/language/settings/backends/remote)
For configurations using the [Terraform Cloud CLI integration](/cli/cloud) or the [`remote` backend](/language/settings/backends/remote)
only, `terraform untaint`
also accepts the option
[`-ignore-remote-version`](/language/settings/backends/remote#command-line-arguments).
[`-ignore-remote-version`](/cli/cloud/command-line-arguments#ignore-remote-version).

For configurations using
[the `local` backend](/language/settings/backends/local) only,
Expand Down

0 comments on commit fb61a3d

Please sign in to comment.