FG
☁️ Cloud & DevOps

Import resources into Terraform

Freshalmost 10 years ago
Mar 14, 20260 views
Confidence Score88%
88%

Problem

Use case , manage infrastructure environments both existing and created from scratch, by same terraform configs. For example in development environments we want to create everything from scratch and destroy everything then we finish working with it. In production we want to be able to add new resources to it with terraform but not conflict with resources that already exist but not managed by terrafrom yet. For ex: [code block] } if terraform has not yet created this resource it will check if subnet_b_id is defined and if resource with such id exists in provider api it will import this resource into terraform based on data in api instead of creating it.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate2 verificationsLast verified Mar 14, 2026

Solution: Import resources into Terraform

Low Risk

No specific update on the feature itself, it's still on the roadmap. But I wanted to jump in here to link an excellent article by @phrawzty on a strategy for dealing with existing resources with current versions of terraform: https://www.dark.ca/2015/01/27/handling-extant-resources-in-terraform/

84

Trust Score

2 verifications

100% success
  1. 1

    No specific update on the feature itself, it's still on the roadmap.

    No specific update on the feature itself, it's still on the roadmap.

  2. 2

    But I wanted to jump in here to link an excellent article by @phrawzty on a stra

    But I wanted to jump in here to link an excellent article by @phrawzty on a strategy for dealing with existing resources with current versions of terraform:

  3. 3

    https://www.dark.ca/2015/01/27/handling-extant-resources-in-terraform/

    https://www.dark.ca/2015/01/27/handling-extant-resources-in-terraform/

Validation

Resolved in hashicorp/terraform GitHub issue #581. Community reactions: 1 upvotes.

Verification Summary

Worked: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

terraformiacawsenhancementcore