Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion content/terraform/v1.15.x (beta)/docs/cli/commands/get.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,24 @@ The modules are downloaded into a `.terraform` subdirectory of the current
working directory. Don't commit this directory to your version control
repository.

The `get` command supports the following option:
The `get` command supports the following options:

* `-update` - If specified, modules that are already downloaded will be
checked for updates and the updates will be downloaded if present.

* `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](/terraform/language/block/variable) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](/terraform/cli/commands/plan#input-variables-on-the-command-line) for more information.

* `-var-file=FILENAME` - Sets values for potentially many
[input variables](/terraform/language/block/variable) declared in the
root module of the configuration, using definitions from a
[`.tfvars` file](/terraform/language/values/variables#variable-definition-files).
Use this option multiple times to include values from more than one file.
There are several other ways to set values for input variables in the root
module, aside from the `-var` and `-var-file` options. Refer to
[Assign values to input variables](/terraform/language/values/variables#assign-values-to-input-variables) for more information.

* `-no-color` - Disable text coloring in the output.
15 changes: 15 additions & 0 deletions content/terraform/v1.15.x (beta)/docs/cli/commands/graph.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ Options:
of the default resources-only simplified graph.
Can be: `plan`, `plan-refresh-only`, `plan-destroy`, or `apply`.

* `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](/terraform/language/block/variable) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](/terraform/cli/commands/plan#input-variables-on-the-command-line) for more information.

* `-var-file=FILENAME` - Sets values for potentially many
[input variables](/terraform/language/block/variable) declared in the
root module of the configuration, using definitions from a
[`.tfvars` file](/terraform/language/values/variables#variable-definition-files).
Use this option multiple times to include values from more than one file.
There are several other ways to set values for input variables in the root
module, aside from the `-var` and `-var-file` options. Refer to
[Assign values to input variables](/terraform/language/values/variables#assign-values-to-input-variables) for more information.

## Generating Images

The graph output uses
Expand Down
13 changes: 13 additions & 0 deletions content/terraform/v1.15.x (beta)/docs/cli/commands/modules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ Usage: `terraform modules [options]`
The following optional flags are available:

- `-json` - Displays the module declarations in a machine-readable, JSON format.
- `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](/terraform/language/block/variable) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](/terraform/cli/commands/plan#input-variables-on-the-command-line) for more information.
- `-var-file=FILENAME` - Sets values for potentially many
[input variables](/terraform/language/block/variable) declared in the
root module of the configuration, using definitions from a
[`.tfvars` file](/terraform/language/values/variables#variable-definition-files).
Use this option multiple times to include values from more than one file.
There are several other ways to set values for input variables in the root
module, aside from the `-var` and `-var-file` options. Refer to
[Assign values to input variables](/terraform/language/values/variables#assign-values-to-input-variables) for more information.

The output of `terraform modules -json` includes a `format_version` key, which is set to the value of `"1.0"` in Terraform 1.10.0. The semantics of this version are:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,20 @@ This command also has several subcommands with different purposes.

## Usage

Usage: `terraform providers`
Usage: `terraform providers [options]`

The `terraform providers` command also accepts the following options:

- `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](/terraform/language/block/variable) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](/terraform/cli/commands/plan#input-variables-on-the-command-line) for more information.
- `-var-file=FILENAME` - Sets values for potentially many
[input variables](/terraform/language/block/variable) declared in the
root module of the configuration, using definitions from a
[`.tfvars` file](/terraform/language/values/variables#variable-definition-files).
Use this option multiple times to include values from more than one file.
There are several other ways to set values for input variables in the root
module, aside from the `-var` and `-var-file` options. Refer to
[Assign values to input variables](/terraform/language/values/variables#assign-values-to-input-variables) for more information.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ If you list one or more provider source addresses on the command line then
`terraform providers lock` will restrict its work only to those providers,
leaving the lock entries for other providers (if any) unchanged.

You can customize the default behavior using the following additional option:
You can customize the default behavior using the following additional options:

* `-fs-mirror=PATH` - Direct Terraform to look for provider packages in the
given local filesystem mirror directory, instead of in upstream registries.
Expand Down Expand Up @@ -99,6 +99,21 @@ You can customize the default behavior using the following additional option:
`terraform provider lock` command is used to ensure no untrusted provider
versions can be used installing the plugins from the cache is considered risky.

* `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](/terraform/language/block/variable) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](/terraform/cli/commands/plan#input-variables-on-the-command-line) for more information.

* `-var-file=FILENAME` - Sets values for potentially many
[input variables](/terraform/language/block/variable) declared in the
root module of the configuration, using definitions from a
[`.tfvars` file](/terraform/language/values/variables#variable-definition-files).
Use this option multiple times to include values from more than one file.
There are several other ways to set values for input variables in the root
module, aside from the `-var` and `-var-file` options. Refer to
[Assign values to input variables](/terraform/language/values/variables#assign-values-to-input-variables) for more information.


## Specifying Target Platforms

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if you upload the resulting directory to a static website host. Terraform
ignores those index files when using the directory as a filesystem mirror,
because the directory entries themselves are authoritative in that case.

This command supports the following additional option:
This command supports the following additional options:

* `-platform=OS_ARCH` - Choose which target platform to build a mirror for.
By default Terraform will obtain plugin packages suitable for the platform
Expand All @@ -63,6 +63,21 @@ This command supports the following additional option:
providers. By default (`true`) the mirror command will use the version info in the
lock file if the configuration directory has been previously initialized.

* `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](/terraform/language/block/variable) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](/terraform/cli/commands/plan#input-variables-on-the-command-line) for more information.

* `-var-file=FILENAME` - Sets values for potentially many
[input variables](/terraform/language/block/variable) declared in the
root module of the configuration, using definitions from a
[`.tfvars` file](/terraform/language/values/variables#variable-definition-files).
Use this option multiple times to include values from more than one file.
There are several other ways to set values for input variables in the root
module, aside from the `-var` and `-var-file` options. Refer to
[Assign values to input variables](/terraform/language/values/variables#assign-values-to-input-variables) for more information.

You can run `terraform providers mirror` again on an existing mirror directory
to update it with new packages. For example, you can add packages for a new
target platform by re-running the command with the desired new `-platform=...`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,24 @@ $ terraform providers schema [options]

The following flags are available:

- `-json` - Displays the schemas in a machine-readable JSON format. The `-json` flag is required.

The output includes a `format_version` key, which has a default value of `"1.0"`. The semantics of this version are:
- `-json` - Displays the schemas in a machine-readable JSON format. The `-json` flag is required.

- `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](/terraform/language/block/variable) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](/terraform/cli/commands/plan#input-variables-on-the-command-line) for more information.

- `-var-file=FILENAME` - Sets values for potentially many
[input variables](/terraform/language/block/variable) declared in the
root module of the configuration, using definitions from a
[`.tfvars` file](/terraform/language/values/variables#variable-definition-files).
Use this option multiple times to include values from more than one file.
There are several other ways to set values for input variables in the root
module, aside from the `-var` and `-var-file` options. Refer to
[Assign values to input variables](/terraform/language/values/variables#assign-values-to-input-variables) for more information.

The output includes a `format_version` key, which has a default value of `"1.0"`. The semantics of this version are:

- Versions between `1.0` and `2.0` are backward-compatible. You should ignore any object properties with unrecognized names to
remain forward-compatible with future minor versions.
Expand Down
14 changes: 14 additions & 0 deletions content/terraform/v1.15.x (beta)/docs/cli/commands/state/mv.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ This command also accepts the following options:
- `-dry-run` - Report all of the resource instances that match the given
address without actually "forgetting" any of them.

- `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](/terraform/language/block/variable) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](/terraform/cli/commands/plan#input-variables-on-the-command-line) for more information.
- `-var-file=FILENAME` - Sets values for potentially many
[input variables](/terraform/language/block/variable) declared in the
root module of the configuration, using definitions from a
[`.tfvars` file](/terraform/language/values/variables#variable-definition-files).
Use this option multiple times to include values from more than one file.
There are several other ways to set values for input variables in the root
module, aside from the `-var` and `-var-file` options. Refer to
[Assign values to input variables](/terraform/language/values/variables#assign-values-to-input-variables) for more information.

- `-lock=false` - Don't hold a state lock during the operation. This is
dangerous if others might concurrently run commands against the same
workspace.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,29 @@ The `terraform state pull` downloads and outputs state information from a [remot

## Usage

Usage: `terraform state pull`
Usage: `terraform state pull [options]`

This command downloads the state from its current location, upgrades the
local copy to the latest state file version that is compatible with
locally-installed Terraform, and outputs the raw format to stdout.

This command also accepts the following options:

- `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](/terraform/language/block/variable) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](/terraform/cli/commands/plan#input-variables-on-the-command-line) for more information.

- `-var-file=FILENAME` - Sets values for potentially many
[input variables](/terraform/language/block/variable) declared in the
root module of the configuration, using definitions from a
[`.tfvars` file](/terraform/language/values/variables#variable-definition-files).
Use this option multiple times to include values from more than one file.
There are several other ways to set values for input variables in the root
module, aside from the `-var` and `-var-file` options. Refer to
[Assign values to input variables](/terraform/language/values/variables#assign-values-to-input-variables) for more information.

This is useful for reading values out of state (potentially pairing this
command with something like [jq](https://stedolan.github.io/jq/)). It is
also useful if you need to make manual modifications to state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,24 @@ 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.

This command also accepts the following options:

- `-force` - Disable the safety checks for differing lineage and higher remote serial.

- `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](/terraform/language/block/variable) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](/terraform/cli/commands/plan#input-variables-on-the-command-line) for more information.
- `-var-file=FILENAME` - Sets values for potentially many
[input variables](/terraform/language/block/variable) declared in the
root module of the configuration, using definitions from a
[`.tfvars` file](/terraform/language/values/variables#variable-definition-files).
Use this option multiple times to include values from more than one file.
There are several other ways to set values for input variables in the root
module, aside from the `-var` and `-var-file` options. Refer to
[Assign values to input variables](/terraform/language/values/variables#assign-values-to-input-variables) for more information.

For configurations using the [HCP Terraform CLI integration](/terraform/cli/cloud) or the [`remote` backend](/terraform/language/backend/remote)
only, `terraform state push`
also accepts the option
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ This command also accepts the following options:

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

- `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](/terraform/language/block/variable) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](/terraform/cli/commands/plan#input-variables-on-the-command-line) for more information.

- `-var-file=FILENAME` - Sets values for potentially many
[input variables](/terraform/language/block/variable) declared in the
root module of the configuration, using definitions from a
[`.tfvars` file](/terraform/language/values/variables#variable-definition-files).
Use this option multiple times to include values from more than one file.
There are several other ways to set values for input variables in the root
module, aside from the `-var` and `-var-file` options. Refer to
[Assign values to input variables](/terraform/language/values/variables#assign-values-to-input-variables) for more information.

- `-lock=false` - Don't hold a state lock during the operation. This is
dangerous if others might concurrently run commands against the same
workspace.
Expand Down
15 changes: 15 additions & 0 deletions content/terraform/v1.15.x (beta)/docs/cli/commands/state/rm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ This command also accepts the following options:
returning an error. The duration syntax is a number followed by a time
unit letter, such as "3s" for three seconds.

- `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](/terraform/language/block/variable) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](/terraform/cli/commands/plan#input-variables-on-the-command-line) for more information.

- `-var-file=FILENAME` - Sets values for potentially many
[input variables](/terraform/language/block/variable) declared in the
root module of the configuration, using definitions from a
[`.tfvars` file](/terraform/language/values/variables#variable-definition-files).
Use this option multiple times to include values from more than one file.
There are several other ways to set values for input variables in the root
module, aside from the `-var` and `-var-file` options. Refer to
[Assign values to input variables](/terraform/language/values/variables#assign-values-to-input-variables) for more information.

For configurations using the [HCP Terraform CLI integration](/terraform/cli/cloud) or the [`remote` backend](/terraform/language/backend/remote)
only, `terraform state rm`
also accepts the option
Expand Down
14 changes: 14 additions & 0 deletions content/terraform/v1.15.x (beta)/docs/cli/commands/taint.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ This command accepts the following options:
returning an error. The duration syntax is a number followed by a time
unit letter, such as "3s" for three seconds.

- `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](/terraform/language/block/variable) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](/terraform/cli/commands/plan#input-variables-on-the-command-line) for more information.
- `-var-file=FILENAME` - Sets values for potentially many
[input variables](/terraform/language/block/variable) declared in the
root module of the configuration, using definitions from a
[`.tfvars` file](/terraform/language/values/variables#variable-definition-files).
Use this option multiple times to include values from more than one file.
There are several other ways to set values for input variables in the root
module, aside from the `-var` and `-var-file` options. Refer to
[Assign values to input variables](/terraform/language/values/variables#assign-values-to-input-variables) for more information.

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