Infrastructure · Flashcard

What does the terraform import command do?

  • ABrings an existing real resource under Terraform management by recording it in state
  • BCreates a brand new resource from configuration and records it in the state file
  • CCopies a resource definition from another module into the current configuration
  • DDownloads a published module from the Registry into the working directory tree

Why this is the answer

import adopts an already-existing object so Terraform starts managing it in state. It does not create anything new — that is what apply does.

Official docs
Study in Gnoseed →