diff --git a/website/docs/cli/commands/apply.mdx b/website/docs/cli/commands/apply.mdx index ece491cdc..035176821 100644 --- a/website/docs/cli/commands/apply.mdx +++ b/website/docs/cli/commands/apply.mdx @@ -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 `-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 options](/cli/commands/plan#planning-options) that `terraform plan` would 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 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 -`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). +apply command executes and reports on the apply operation. * `-auto-approve` - Skips interactive approval of plan before applying. This 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 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 [the `local` backend](/language/settings/backends/local) only, `terraform apply` also accepts the legacy options diff --git a/website/docs/cli/commands/plan.mdx b/website/docs/cli/commands/plan.mdx index 8cb8112e1..57d2ed5f5 100644 --- a/website/docs/cli/commands/plan.mdx +++ b/website/docs/cli/commands/plan.mdx @@ -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 `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. 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 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 normally have caused only an "update" action, or no action at all, then 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 has become degraded in some way. If you are using immutable infrastructure 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 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) 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 those instances depend on. @@ -174,14 +174,14 @@ the previous section, are also available with the same meanings on [Resource Targeting](#resource-targeting) 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 root module of the configuration. Use this option multiple times to set more than one variable. For more information see [Input Variables on the Command Line](#input-variables-on-the-command-line), 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 root module of the configuration, using definitions from a ["tfvars" file](/language/values/variables#variable-definitions-tfvars-files).