Skip to content

testform untaint

Ventana de terminal
testform [global options] untaint [options] <address>

Testform uses the term tainted to describe a resource instance that may not be fully functional, either because its creation partially failed or because you manually marked it as such using testform taint.

The testform untaint command removes that state from a resource instance, causing Testform to see it as healthy and functional again. This avoids Testform planning to replace the tainted instance in a subsequent apply operation.

This command will not modify your remote test entities directly.


Option Default Description
<address> (required) Canonical address or identity tag of the resource (e.g. "login.case.feature.@tc-1").
-allow-missing false If specified, the command succeeds (exit code 0) even if the resource is missing from state.
-lock=false true Do not hold a state lock during the operation.
-lock-timeout=0s 0s Duration to retry a state lock.
-state=path testform.state Custom path to the state file.

Ventana de terminal
$ testform untaint "login.case.feature.@tc-1"
Resource instance login.case.feature.@tc-1 has been successfully untainted.

2. Idempotent Untaint in Automation Scripts (-allow-missing)

Section titled “2. Idempotent Untaint in Automation Scripts (-allow-missing)”
Ventana de terminal
$ testform untaint -allow-missing "checkout.case.feature.@tc-2"
Resource not found in state, but allow-missing is set. Exiting successfully.

After removing the tainted status, running testform plan verifies that the resource is no longer scheduled for replacement (-/+):

Ventana de terminal
$ testform plan
No changes. Your infrastructure matches the configuration.

  • 0: Resource successfully untainted (or missing when -allow-missing is set).
  • 1: Resource address was not found in the state ledger or failed to acquire state lock.