What does -replace do here?
terraform apply -replace="aws_instance.web"
- Renames the resource in state
- Forces that instance to be recreated
- Swaps it for a cheaper instance type
- Replaces only its tags in place
-replace plans a destroy-and-create for that one resource even though its config is unchanged; it supersedes terraform taint.
Play DevOps ▸