Adopt an existing object and inspect its state
Choose import, state inspection and scoped debugging from the evidence you need.
Adopt an existing object and inspect its state
To adopt an existing object, determine its provider-specific import identity, select a unique resource address and supply the matching configuration. An import block can make the adoption reviewable in a plan. Reconcile non-default settings before applying any proposed mutation. One remote object should have one owning address. Document any handoff between teams or states.
Use state list to discover addresses and state show to examine a specific binding. A human-readable state inspection differs from exporting a machine-readable plan or state. Treat all outputs as sensitive. Enable detailed CLI logging only for a bounded diagnostic run, write it to a restricted location and remove private information before sharing a small relevant excerpt.
Worked case 1
An imported database appears in state, but the next plan would change its storage settings. What should the operator check?
Check your reasoning
Compare the actual object to the resource arguments and provider defaults. Import establishes identity. The configuration still determines which attributes Terraform proposes to manage.
Worked case 2
An operator wants existing infrastructure to continue running as another team assumes ownership. What is the distinction between removing a binding and destroying the object?
Check your reasoning
A deliberate handoff can remove Terraform’s binding without deleting the actual object. Coordinate both states, change configuration and verify the plans so that neither stack recreates or deletes it unexpectedly.
HashiCorp objective references: 7a–7c.
Import existing infrastructure · Official Terraform 004 objectives for this domain
Related lesson in Azure Administrator Associate. Apply policy, locks and cost controls.
Practice with the recording
An import succeeds, then the next plan proposes deleting the imported object. What is the missing piece?
Check your reasoning
Ensure that configuration declares the resource at the imported address and describes the settings the team intends to manage. For a configuration-driven import, review generated or hand-written configuration and the resulting plan before applying.
sthithapragna · Terraform Associate 004 full course · 4:35:50
Apply the current exam objectives
Contrast a CLI import with an import block. The CLI operation writes the binding to state. A planned import block lets reviewers inspect the proposed binding and can be used with configuration generation where supported. Inspect provider defaults in any generated configuration before adopting it.
Practice the individual exam skills
- 7a–7c Import a disposable resource at the matching address and inspect it with state list and state show. If the behavior is unexpected, enable logging for one run and protect the output because diagnostic files can contain sensitive values.
Adopt an existing object and inspect its state quiz
Answer 3 questions. Check each answer for an explanation.