Adopt existing identities and review initialization actions
A hands-on TERRAFORM-004 lab. You produce the real artefact and 10 automated checks verify it behaves the way the exam expects.
Try this labAll TERRAFORM-004 practice
- Certification
- TERRAFORM-004
- Format
- Structured configuration
- Difficulty
- medium
- Estimated time
- 25 min
- Automated checks
- 10
The brief
Edit adoption.tf.json to adopt the supplied existing marker identities at their requested addresses. api must bind original-api at terraform_data.adopted["api"] with input {name = "api", owner = "payments"}; worker must bind original-worker at terraform_data.adopted["worker"] with input {name = "worker", owner = "payments"}. Keep the existing terraform_data.audit binding owned-audit and input "security-log" unchanged. Declare exactly those three destinations. Each object ID may have only one address owner. The built-in terraform_data import starts with null input; the expected reviewed actions are adoption plus initialization updates to the approved payloads, rather than new creation, replacement or destruction. Do not add triggers_replace to force a replacement of an adopted identity. Direct import blocks use static to addresses and literal id strings. A distinct valid route uses a known literal for_each map of destination keys to IDs, to = terraform_data.adopted[each.key], and id = ${each.value}. The resource's literal for_each map supplies complete payloads with input = ${each.value}; the audit resource uses a literal input. Only built-in terraform_data declarations with input, optional literal triggers_replace and optional literal for_each, plus these bounded import forms, are supported. Arbitrary expressions, provider identity maps, modules and other resource schemas are outside this exercise. Inspect importMappings, bindings, duplicateObjectIds and actions after Run tests. Repair through normal edits without Reset.
What the checks verify
Your work is graded on 10 independent properties, not on matching one reference answer.
- The artifact uses supported Terraform JSON resource and import declarations.
- Exactly the two requested adoption destinations and existing audit resource are declared.
- Every import selects a declared destination without competing import blocks.
- The api destination adopts original-api without losing its identity.
- The worker destination adopts original-worker without losing its identity.
- The API resource initializes the approved name and owner payload.
- The worker resource initializes the approved name and owner payload.
- Each claimed existing object ID belongs to one configured address.
- The reviewed plan adopts and initializes without creating, replacing or destroying objects.
- The existing audit address, object ID and input are unchanged.
Where this sits in the TERRAFORM-004 blueprint
- Domain
- Maintain infrastructure with Terraform
- Objective
- Adoption
- Skill
- Existing Object Import
Part of TERRAFORM-004 preparation
Labs are written by ExamNova to teach the decisions the exam tests. They are not reproductions of vendor lab content.