TL;DR
Terraform import brings a resource that already exists in the cloud into Terraform state without changing the resource itself. The classic command writes only state, so the matching configuration stays manual, and a mismatch can appear in the next plan as an unexpected change or even a replacement. Import blocks and generated configuration reduced that manual work, but import still needs a resource ID that someone already has. This guide walks through the classic command, import blocks, batch imports, common errors, and how SGCode handles discovery.
Cloud accounts rarely stay as tidy as the code written for them. Engineers open console tabs during incidents, acquired companies arrive with undocumented accounts, and one-off scripts leave resources behind long after the people who ran them have moved on.…