As configurations grow, you rename resources, move them into modules and switch from count to for_each. Each of these changes the resource's address. Terraform tracks objects by address, so if you simply rename aws_instance.web to aws_instance.frontend, the plan shows the old address being destroyed and a new one being created. For a database or a production server, that is exactly what you do not want. Refactoring tools tell Terraform that the object has only moved.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 5 more sections, 4 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.