Add cli integration to command pages

This commit is contained in:
Laura Pacilio 2021-12-21 17:19:05 -05:00
parent f55af42086
commit 3adcc0158c
7 changed files with 43 additions and 50 deletions

View File

@ -1,5 +1,5 @@
---
page_title: 'Command: import'
page_title: "Command: import"
description: The terraform import command brings existing resources into Terraform state.
---
@ -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
@ -77,7 +77,7 @@ The command-line flags are all optional. The list of available flags are:
useful with the `-config` flag.
For configurations using
[the `remote` backend](/language/settings/backends/remote)
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).

View File

@ -1,5 +1,5 @@
---
page_title: 'Command: state mv'
page_title: "Command: state mv"
description: >-
The `terraform state mv` command changes bindings in Terraform state,
associating existing remote objects with new resource instances.
@ -54,20 +54,19 @@ 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).

View File

@ -1,5 +1,5 @@
---
page_title: 'Command: state push'
page_title: "Command: state push"
description: The `terraform state push` command pushes items to the Terraform state.
---
@ -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).

View File

@ -1,5 +1,5 @@
---
page_title: 'Command: state replace-provider'
page_title: "Command: state replace-provider"
description: >-
The `terraform state replace-provider` command replaces the provider for
resources in the Terraform state.
@ -24,16 +24,15 @@ 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).

View File

@ -1,5 +1,5 @@
---
page_title: 'Command: state rm'
page_title: "Command: state rm"
description: >-
The `terraform state rm` command removes bindings from the Terraform state,
causing Terraform to "forget about" existing objects.
@ -37,20 +37,19 @@ 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).

View File

@ -1,5 +1,5 @@
---
page_title: 'Command: taint'
page_title: "Command: taint"
description: |-
The `terraform taint` command informs Terraform that a particular object
is damaged or degraded.
@ -35,29 +35,27 @@ 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).

View File

@ -1,5 +1,5 @@
---
page_title: 'Command: untaint'
page_title: "Command: untaint"
description: |-
The `terraform untaint` command tells Terraform that an object is functioning
correctly, even though its creation failed or it was previously manually
@ -43,26 +43,25 @@ 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).