diff --git a/internal/command/apply.go b/internal/command/apply.go index 3bf441ecad..be6b8daa63 100644 --- a/internal/command/apply.go +++ b/internal/command/apply.go @@ -379,6 +379,9 @@ Options: -parallelism=n Limit the number of parallel resource operations. Defaults to 10. + -replace=resource Terraform will plan to replace this resource instance + instead of doing an update or no-op action. + -state=path Path to read and save state (unless state-out is specified). Defaults to "terraform.tfstate". diff --git a/website/docs/cli/commands/apply.mdx b/website/docs/cli/commands/apply.mdx index 2eb5a9a8c6..2c2abe1489 100644 --- a/website/docs/cli/commands/apply.mdx +++ b/website/docs/cli/commands/apply.mdx @@ -86,6 +86,9 @@ The following options change how the apply command executes and reports on the a [walks the graph](/terraform/internals/graph#walking-the-graph). Defaults to 10\. +- `-replace=resource` - Terraform will plan to replace this resource instance + instead of doing an update or no-op action. + - All [planning modes](/terraform/cli/commands/plan#planning-modes) and [planning options](/terraform/cli/commands/plan#planning-options) for `terraform plan` - Customize how Terraform will create the plan. Only available when you run `terraform apply` without a saved plan file.