Introduction
When you use Terraform to create or change cloud resources, it keeps a record called the state. This state helps Terraform know what resources exist and what needs to be updated or deleted. Mapping the state to the real infrastructure means checking that Terraform's record matches what is actually running in the cloud.
When you want to see what resources Terraform has created in your cloud account.
When you need to update or delete resources and want to avoid mistakes.
When you want to check if someone changed resources outside of Terraform.
When you are starting to manage existing resources with Terraform.
When you want to safely plan changes before applying them.