github.com/hugorut/terraform@v1.1.3/website/docs/cli/state/taint.mdx (about) 1 --- 2 page_title: Forcing Re-creation of Resources (Tainting) - Terraform CLI 3 description: Commands that allow you to destroy and re-create resources manually. 4 --- 5 6 # Forcing Re-creation of Resources (Tainting) 7 8 When a resource declaration is modified, Terraform usually attempts to update 9 the existing resource in place (although some changes can require destruction 10 and re-creation, usually due to upstream API limitations). 11 12 In some cases, you might want a resource to be destroyed and re-created even 13 when Terraform doesn't think it's necessary. This is usually for objects that 14 aren't fully described by their resource arguments due to side-effects that 15 happen during creation; for example, a virtual machine that configures itself 16 with `cloud-init` on startup might no longer meet your needs if the cloud-init 17 configuration changes. 18 19 - [The `terraform taint` command](/cli/commands/taint) tells Terraform to 20 destroy and re-create a particular resource during the next apply, regardless 21 of whether its resource arguments would normally require that. 22 23 - [The `terraform untaint` command](/cli/commands/untaint) undoes a 24 previous taint, or can preserve a resource that was automatically tainted due 25 to failed [provisioners](/language/resources/provisioners/syntax).