Introduction
Sometimes you have existing cloud resources created outside Terraform. To manage them with Terraform, you import them and then write configuration that matches their current state. This lets Terraform track and update those resources safely.
When you want to start managing an existing cloud server with Terraform without recreating it
When a resource was created manually or by another tool and you want to bring it under Terraform control
When migrating infrastructure to Terraform step-by-step without downtime
When you need to fix drift by importing resources that got out of sync
When collaborating with a team that created resources outside Terraform but you want a single source of truth