Introduction
Sometimes you have existing resources created outside Terraform and want to manage them with Terraform. The import block syntax in Terraform 1.5+ lets you declare these imports inside your configuration, so Terraform knows about them before you apply changes.
When you have a cloud resource created manually and want Terraform to manage it without recreating it.
When you want to keep your Terraform state in sync with resources created by other teams or tools.
When migrating existing infrastructure to Terraform management gradually.
When you want to automate importing resources as part of your Terraform workflow.
When you want to avoid running separate import commands manually.