Terraform 1.5, released June 2023, added a declarative import block written in configuration alongside the resource it targets. Unlike the older terraform import command, which mutated state immediately with no preview, an import block is processed during plan and the resulting plan shows exactly what will be imported and what drift exists between the real object and the configuration.
This matters because the command form gave no way to check the configuration matched before committing, so a mismatched attribute produced a plan proposing to destroy and recreate the resource that had just been adopted.
Adding -generate-config-out=FILE to terraform plan writes generated resource configuration for imported objects into that file, which is a starting point rather than final code: it emits every attribute including computed ones and needs editing. Import blocks are removed from configuration after the apply that consumes them, the same lifecycle as moved blocks. Importing still requires the resource address and the provider-specific ID string, which differs per resource type and is documented on each resource page.