Command: untaint
Theterraform untaint command removes the “tainted” state from a resource instance, indicating that it is fully functional and does not need to be recreated.
Usage
terraform taint command.
This command removes that state from a resource instance, causing Terraform to see it as fully-functional and not in need of replacement.
This will not modify your infrastructure directly. It only avoids Terraform planning to replace a tainted instance in a future operation.
Options
-
-allow-missing- If specified, the command will succeed (exit code 0) even if the resource is missing. -
-lock=false- Don’t hold a state lock during the operation. This is dangerous if others might concurrently run commands against the same workspace. -
-lock-timeout=DURATION- Duration to retry a state lock. Default is0s. -
-ignore-remote-version- A rare option used for the remote backend only. See the remote backend documentation for more information.
terraform untaint also accepts the legacy options -state, -state-out, and -backup.