thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

DevOps & Automation · Advanced

terraform import

Bringing existing infrastructure under Terraform management by recording it in state.

Definition

The CLI command terraform import and the declarative import block (Terraform 1.5+) map a real resource ID to a resource address. With -generate-config-out, Terraform can generate matching configuration.

Example

import { to = aws_s3_bucket.logs id = "acme-logs" }

Exam tip

Import adds to state; you still need matching configuration or the next plan will propose changes or destruction.

Related terms