terraform/terraform-taint

Mark Resource for Recreation

Mark a resource to be destroyed and recreated on next apply

terraform
taint
resource

Command

terraform taint aws_instance.my_instance

Explanation

Marks a resource as tainted, forcing Terraform to destroy and recreate it on the next apply. Useful for forcing refresh of problematic resources.

Examples

Mark DB instance for recreation

terraform taint module.db.aws_db_instance.main