Importing an Existing Infrastructure
Discover how to use the terraform import command to take control of your existing cloud infrastructure by bringing it under Terraform management. Learn when and how to import resources, the benefits of avoiding downtime, and the necessity of writing matching configurations to effectively manage your infrastructure as code.
The terraform import command
The terraform import command is used to import existing resources into Terraform. This enables us to take existing resources and bring them under Terraform’s management. Most environments aren’t going to be greenfield deployments with no existing infrastructure. The terraform import command is a way to bring that existing infrastructure under Terraform’s management without altering the underlying resources. The terraform import command can also be useful in situations where an administrator manually created a resource outside of Terraform’s management. That resource needs to be brought into the fold. Ideally, once we’ve adopted Terraform, all new resources will be created and ...