Making replace flag clearer and making plan options clearer
This commit is contained in:
parent
0900c7e0bb
commit
238396567d
|
@ -39,7 +39,7 @@ Terraform will propose the plan to you and prompt you to approve it before
|
||||||
taking the described actions, unless you waive that prompt by using the
|
taking the described actions, unless you waive that prompt by using the
|
||||||
`-auto-approve` option.
|
`-auto-approve` option.
|
||||||
|
|
||||||
When performing its own plan, `terraform apply` supports all of the same
|
-> **Tip:** When performing its own plan, `terraform apply` supports all of the same
|
||||||
[planning modes](/cli/commands/plan#planning-modes) and
|
[planning modes](/cli/commands/plan#planning-modes) and
|
||||||
[planning options](/cli/commands/plan#planning-options) that `terraform plan` would
|
[planning options](/cli/commands/plan#planning-options) that `terraform plan` would
|
||||||
accept, so you can customize how Terraform will create the plan.
|
accept, so you can customize how Terraform will create the plan.
|
||||||
|
@ -67,10 +67,7 @@ plan`'s planning modes and planning options. For details, see:
|
||||||
### Apply Options
|
### Apply Options
|
||||||
|
|
||||||
The following options allow you to change various details about how the
|
The following options allow you to change various details about how the
|
||||||
apply command executes and reports on the apply operation. If you are running
|
apply command executes and reports on the apply operation.
|
||||||
`terraform apply` _without_ a previously-saved plan file, these options are
|
|
||||||
_in addition to_ the planning modes and planning options described for
|
|
||||||
[`terraform plan`](/cli/commands/plan).
|
|
||||||
|
|
||||||
* `-auto-approve` - Skips interactive approval of plan before applying. This
|
* `-auto-approve` - Skips interactive approval of plan before applying. This
|
||||||
option is ignored when you pass a previously-saved plan file, because
|
option is ignored when you pass a previously-saved plan file, because
|
||||||
|
@ -114,6 +111,9 @@ _in addition to_ the planning modes and planning options described for
|
||||||
[walks the graph](/internals/graph#walking-the-graph). Defaults to
|
[walks the graph](/internals/graph#walking-the-graph). Defaults to
|
||||||
10\.
|
10\.
|
||||||
|
|
||||||
|
- Planning modes and options available for
|
||||||
|
[`terraform plan`](/cli/commands/plan#planning-options) - Only available when you run `terraform apply` without a previously-saved plan file.
|
||||||
|
|
||||||
For configurations using
|
For configurations using
|
||||||
[the `local` backend](/language/settings/backends/local) only,
|
[the `local` backend](/language/settings/backends/local) only,
|
||||||
`terraform apply` also accepts the legacy options
|
`terraform apply` also accepts the legacy options
|
||||||
|
|
|
@ -137,7 +137,7 @@ options in this section, along with the planning mode selection options in
|
||||||
the previous section, are also available with the same meanings on
|
the previous section, are also available with the same meanings on
|
||||||
`terraform apply`.
|
`terraform apply`.
|
||||||
|
|
||||||
* `-refresh=false` - Disables the default behavior of synchronizing the
|
- `-refresh=false` - Disables the default behavior of synchronizing the
|
||||||
Terraform state with remote objects before checking for configuration changes.
|
Terraform state with remote objects before checking for configuration changes.
|
||||||
|
|
||||||
This option can potentially make the planning operation faster by reducing
|
This option can potentially make the planning operation faster by reducing
|
||||||
|
@ -149,7 +149,7 @@ the previous section, are also available with the same meanings on
|
||||||
it would effectively disable the entirety of the planning operation in that
|
it would effectively disable the entirety of the planning operation in that
|
||||||
case.
|
case.
|
||||||
|
|
||||||
* `-replace=ADDRESS` - Instructs Terraform to plan to replace the single
|
- `-replace=ADDRESS` - Instructs Terraform to plan to replace the single
|
||||||
resource instance with the given address. If the given instance would
|
resource instance with the given address. If the given instance would
|
||||||
normally have caused only an "update" action, or no action at all, then
|
normally have caused only an "update" action, or no action at all, then
|
||||||
Terraform will choose a "replace" action instead.
|
Terraform will choose a "replace" action instead.
|
||||||
|
@ -157,7 +157,7 @@ the previous section, are also available with the same meanings on
|
||||||
You can use this option if you have learned that a particular remote object
|
You can use this option if you have learned that a particular remote object
|
||||||
has become degraded in some way. If you are using immutable infrastructure
|
has become degraded in some way. If you are using immutable infrastructure
|
||||||
patterns then you may wish to respond to that by replacing the
|
patterns then you may wish to respond to that by replacing the
|
||||||
malfunctioning object with a new object that has the same configuration.
|
malfunctioning object with a new object that has the same configuration. You can also replace multiple objects at once by adding multiple flags to the command.
|
||||||
|
|
||||||
This option is allowed only in the normal planning mode, so this option
|
This option is allowed only in the normal planning mode, so this option
|
||||||
is incompatible with the `-destroy` option.
|
is incompatible with the `-destroy` option.
|
||||||
|
@ -166,7 +166,7 @@ the previous section, are also available with the same meanings on
|
||||||
For earlier versions, you can achieve a similar effect (with some caveats)
|
For earlier versions, you can achieve a similar effect (with some caveats)
|
||||||
using [`terraform taint`](/cli/commands/taint).
|
using [`terraform taint`](/cli/commands/taint).
|
||||||
|
|
||||||
* `-target=ADDRESS` - Instructs Terraform to focus its planning efforts only
|
- `-target=ADDRESS` - Instructs Terraform to focus its planning efforts only
|
||||||
on resource instances which match the given address and on any objects that
|
on resource instances which match the given address and on any objects that
|
||||||
those instances depend on.
|
those instances depend on.
|
||||||
|
|
||||||
|
@ -174,14 +174,14 @@ the previous section, are also available with the same meanings on
|
||||||
[Resource Targeting](#resource-targeting)
|
[Resource Targeting](#resource-targeting)
|
||||||
below for more information.
|
below for more information.
|
||||||
|
|
||||||
* `-var 'NAME=VALUE'` - Sets a value for a single
|
- `-var 'NAME=VALUE'` - Sets a value for a single
|
||||||
[input variable](/language/values/variables) declared in the
|
[input variable](/language/values/variables) declared in the
|
||||||
root module of the configuration. Use this option multiple times to set
|
root module of the configuration. Use this option multiple times to set
|
||||||
more than one variable. For more information see
|
more than one variable. For more information see
|
||||||
[Input Variables on the Command Line](#input-variables-on-the-command-line),
|
[Input Variables on the Command Line](#input-variables-on-the-command-line),
|
||||||
below.
|
below.
|
||||||
|
|
||||||
* `-var-file=FILENAME` - Sets values for potentially many
|
- `-var-file=FILENAME` - Sets values for potentially many
|
||||||
[input variables](/language/values/variables) declared in the
|
[input variables](/language/values/variables) declared in the
|
||||||
root module of the configuration, using definitions from a
|
root module of the configuration, using definitions from a
|
||||||
["tfvars" file](/language/values/variables#variable-definitions-tfvars-files).
|
["tfvars" file](/language/values/variables#variable-definitions-tfvars-files).
|
||||||
|
|
Loading…
Reference in New Issue