terraform taint on a resource?terraform taint on it. What is the immediate effect on Terraform's state and next apply?Running terraform taint marks a resource as 'tainted' in the state file. This tells Terraform that the resource is considered bad and should be replaced on the next terraform apply. It does not delete or remove the resource immediately.
terraform untaint on a tainted resource?terraform untaint on it. What happens to the resource in Terraform's state and next apply?terraform untaint removes the tainted mark from a resource in the state file. This means Terraform will treat the resource as healthy and will not replace it on the next apply.
terraform taint considered deprecated in Terraform 1.1+?terraform taint as deprecated. What is the main reason for this deprecation?Terraform introduced the -replace flag on terraform apply to replace resources safely without manually marking them tainted in the state. This makes terraform taint unnecessary and deprecated.
terraform taint improperly in a shared environment?If a team member taints a resource without informing others, the next apply will replace it, possibly causing downtime or data loss. Coordination is important to avoid surprises.
terraform taint for replacing a resource in Terraform 1.1+?terraform taint?Terraform 1.1+ recommends using terraform apply -replace=resource_address to replace resources safely. This avoids manual state changes and is less error-prone than tainting.