DELAPARRA
Index
Color
NL
Category: Terraform

taint

Explained by Updated

What is taint?

taint: Marks a resource for recreation on the next apply. Largely replaced by terraform apply -replace. Tainting a resource in Terraform marks it for replacement: on the next apply, Terraform destroys it and creates a new one, even if its configuration did not change. This is useful when a resource is broken in a way Terraform cannot see, such as a server whose start-up script failed halfway. Recreating it from scratch is often the quickest fix.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about taint

What should you keep in mind with taint?

The terraform taint command is deprecated. Use terraform apply -replace="aws_instance.web" instead, which shows the replacement in the plan before anything happens, so you can review it. Be careful with resources that hold data, such as databases and disks. Replacing them means losing what is on them unless you have a backup or the data lives elsewhere.

What does an example of taint look like?

terraform apply -replace="aws_instance.web"

At a glance

CategoryTerraform
Explained by
Updated

More Terraform terms

All terms starting with T

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.