terraform-taint
Mark a Terraform resource as tainted to force replacement on next apply
TLDR
SYNOPSIS
terraform taint [options] address
DESCRIPTION
terraform taint marks a resource instance in the Terraform state as "tainted". On the next `terraform apply`, Terraform will destroy the existing object and create a replacement.This was historically used to force replacement of resources that became inconsistent or corrupted.Note: This command is deprecated. The recommended approach is to use the `-replace` flag on `terraform apply` or `terraform plan`, e.g. `terraform apply -replace="aws_instance.example"`.
PARAMETERS
-allow-missing
Succeed even if the resource address is not present in state.-lock=true|false
Acquire a state lock (default true). Use `-lock=false` to disable.-lock-timeout=duration
Duration to retry acquiring a state lock (e.g. `3s`).-var 'NAME=VALUE'
Set an input variable value (repeatable).-var-file=filename
Load variable values from a `.tfvars` file (repeatable).
INSTALL
CAVEATS
Tainting is deprecated in modern Terraform versions. Using `-replace` during planning/applying is preferred because it is more explicit and works in a single step. Taint/untaint only affect state and require a separate apply.
SEE ALSO
terraform(1), terraform-apply(1), terraform-untaint(1)
