Pass HashiCorp Terraform Associate 004 Exam in First Attempt Guaranteed!
Get 100% Latest Exam Questions, Accurate & Verified Answers!
30 Days Free Updates, Instant Download!
HashiCorp Terraform Associate 004 Practice Test 21
Question 200
During an authorized design and operations review at a manufacturing supply-chain platform, engineers supporting vendor ordering and inventory APIs discover that a team approves a human-readable plan and later runs terraform apply against a newly generated plan after the repository changes. The team proposes to generate a saved plan with terraform plan -out and apply the vetted plan artifact under change control. The recommendation must address the demonstrated ML failure without an unrelated pipeline redesign. Which post-change observation would establish the required infrastructure or configuration outcome?
Explanation
Correct Answer
The executed artifact hash matches the reviewed plan and unapproved later edits cannot enter the run. A saved Terraform plan can bind an approved decision to a specific proposed change set. Generate a saved plan with terraform plan -out and apply the vetted plan artifact under change control.
Incorrect Answers
CI detects formatting deviations without silently modifying committed source. The executed artifact hash matches the reviewed plan and unapproved later edits cannot enter the run.
Invalid HCL never reaches apply and the corrected configuration passes validation. The executed artifact hash matches the reviewed plan and unapproved later edits cannot enter the run. A saved Terraform plan can bind an approved decision to a specific proposed change set.
The next successful apply converges on desired configuration without recreating already tracked objects. The executed artifact hash matches the reviewed plan and unapproved later edits cannot enter the run.
Question 201
At a renewable energy company, a change advisory board is reviewing ML input and inference paths for field asset operations and grid analytics. The reported issue is that a developer syncs an unencrypted local terraform.tfstate file into a shared project folder. The proposed remedy is to restrict state file permissions and move to an approved secured backend with retention controls. Service owners require a reproducible result without unsafe or unapproved production testing. Which finding would best distinguish the suspected cause from nearby Terraform configuration issues?
Explanation
Correct Answer
File inspection shows provider attributes and sensitive infrastructure data readable by unrelated collaborators. A developer syncs an unencrypted local terraform.tfstate file into a shared project folder. Restrict state file permissions and move to an approved secured backend with retention controls.
Incorrect Answers
State still maps the old root address and the module reference has a different new address. Restrict state file permissions and move to an approved secured backend with retention controls.
Plan for staging shows destructive changes on production resource IDs. File inspection shows provider attributes and sensitive infrastructure data readable by unrelated collaborators. Restrict state file permissions and move to an approved secured backend with retention controls.
Runner audit shows an active workflow and lock ID belonging to the current legitimate writer. At a renewable energy company, file inspection shows provider attributes and sensitive infrastructure data readable by unrelated collaborators. Restrict state file permissions and move to an approved secured backend with retention controls.
Question 202
For metering and outage response at an energy infrastructure operator, the infrastructure platform team is investigating the following incident: an operator changes an instance size outside Terraform and an unchanged HCL plan unexpectedly proposes an update. Confirming evidence shows that provider refresh reports live instance size differs from the tracked configuration. The team must preserve approved data handling and avoid widening access to sensitive features. Which implementation paired with its verification outcome addresses the same fault?
Explanation
Correct Answer
Review drift evidence and decide whether to restore declared state or adopt an approved new configuration. The approved plan reconciles drift without unreviewed destruction. Provider refresh reports live instance size differs from the tracked configuration. Terraform compares desired configuration with refreshed remote objects and recorded state to detect drift.
Incorrect Answers
Review drift evidence and decide whether to restore declared state or adopt an approved new configuration. Only authorized operators can access state and old insecure copies are remediated. That uses the intended change yet measures the wrong result. The approved plan reconciles drift without unreviewed destruction.
Review drift evidence and decide whether to restore declared state or adopt an approved new configuration. Separate runs read the same authoritative state and no duplicate resources are proposed. The intervention addresses the fault, but the proposed test checks a different outcome. The approved plan reconciles drift without unreviewed destruction.
Inspect lock ownership and active runs and only unlock a stale lock after confirming the writer is inactive. The active apply is not interrupted and stale locks are removed only under a controlled incident record. This pair concerns a different control or outcome, leaving the recorded fault unresolved. Review drift evidence and decide whether to restore declared state or adopt an approved new configuration; The approved plan reconciles drift without unreviewed destruction.
Question 203
During an authorized design and operations review at a food distribution operator, engineers supporting warehouse and supply chain services discover that a module declaration adds version=1.2.0 while its source is a Git URL rather than a registry address. The team proposes to pin Git source through a supported ref query or migrate to the registry module syntax. Only a controlled and reversible ML workflow change fits the approved release window. Which post-change observation would establish the required infrastructure or configuration outcome?
Explanation
Correct Answer
Initialization fetches the intended source revision with a supported versioning mechanism. Terraform module version metadata differs between registry source addresses and VCS refs. Pin Git source through a supported ref query or migrate to the registry module syntax.
Incorrect Answers
The child receives approved values without accessing caller-only locals. Initialization fetches the intended source revision with a supported versioning mechanism. Terraform module version metadata differs between registry source addresses and VCS refs.
Clean initialization retrieves the same approved module revision until an explicit upgrade. Initialization fetches the intended source revision with a supported versioning mechanism.
The approved module version downloads for entitled workspaces and unauthorized consumers remain blocked. Initialization fetches the intended source revision with a supported versioning mechanism.
Question 204
At a mobile marketplace operator, a change advisory board is reviewing ML input and inference paths for seller applications and buyer APIs. The reported issue is that a developer logs into HCP Terraform and initializes a root configuration connected to the wrong remote organization or workspace. Confirming evidence shows that cLI run target and backend metadata resolve to a different workspace than the approved deployment request. The recommendation must address the demonstrated ML failure without an unrelated pipeline redesign. Which implementation paired with its verification outcome addresses the same fault?
Explanation
Correct Answer
Configure the correct cloud block organization and workspace selection then authenticate with scoped CLI access. A test plan is associated with the authorized HCP workspace and no other workspace state is changed. CLI run target and backend metadata resolve to a different workspace than the approved deployment request. Terraform CLI cloud integration must identify the actual HCP organization and workspace explicitly.
Incorrect Answers
Configure the correct cloud block organization and workspace selection then authenticate with scoped CLI access. Remote plans authenticate with short-lived scoped credentials and no personal static secrets. The remedy may be appropriate, but that check does not establish the required recovery. A test plan is associated with the authorized HCP workspace and no other workspace state is changed.
Configure the correct cloud block organization and workspace selection then authenticate with scoped CLI access. Runs record reviewed module versions and unauthorized consumers cannot pull restricted modules. The intervention addresses the fault, but the proposed test checks a different outcome. A test plan is associated with the authorized HCP workspace and no other workspace state is changed.
Configure the appropriate HCP Terraform workspace execution mode and controlled VCS or API runs. Plans and applies appear in the authorized workspace history with required governance checkpoints. This pair concerns a different control or outcome, leaving the recorded fault unresolved. Configure the correct cloud block organization and workspace selection then authenticate with scoped CLI access; A test plan is associated with the authorized HCP workspace and no other workspace state is changed.
Question 205
During an authorized design and operations review at a regional bank technology group, engineers supporting payment and customer network systems discover that an administrator opens terraform.tfstate in an editor to change a remote object ID and a later plan tries to manage a different object. The team proposes to use supported terraform state operations under backup and change control rather than editing raw JSON. The team must preserve approved data handling and avoid widening access to sensitive features. Which post-change observation would establish the required infrastructure or configuration outcome?
Explanation
Correct Answer
State moves or removals follow recorded commands with a recoverable state snapshot. State history records an unsupported hand edit and refresh reports the ID does not map to the intended resource. Use supported terraform state operations under backup and change control rather than editing raw JSON.
Incorrect Answers
A sanitized debug trace identifies the failed operation and temporary logs are removed under policy. State history records an unsupported hand edit and refresh reports the ID does not map to the intended resource. State moves or removals follow recorded commands with a recoverable state snapshot.
The correct state-mapped provider ID is confirmed without editing raw state files. State history records an unsupported hand edit and refresh reports the ID does not map to the intended resource. State moves or removals follow recorded commands with a recoverable state snapshot.
Terraform state maps the existing database to the intended address and later plans avoid duplicate creation. State history records an unsupported hand edit and refresh reports the ID does not map to the intended resource. State moves or removals follow recorded commands with a recoverable state snapshot.
Question 206
While protecting seller applications and buyer APIs, the Terraform team at a mobile marketplace operator confirms that an engineer runs terraform import for a module resource before defining the corresponding target block in configuration. Confirming evidence shows that the import operation reports that the specified configuration address cannot be resolved. The recommendation must address the demonstrated ML failure without an unrelated pipeline redesign. Which implementation paired with its verification outcome addresses the same fault?
Explanation
Correct Answer
Declare the expected resource address in the correct module and match the supported import ID form. The existing object is imported into the intended module instance and can be planned safely. An engineer runs terraform import for a module resource before defining the corresponding target block in configuration. Terraform import requires a valid resource address and an identifier understood by the provider.
Incorrect Answers
Declare the expected resource address in the correct module and match the supported import ID form. Terraform state maps the existing database to the intended address and later plans avoid duplicate creation. The intervention addresses the fault, but the proposed test checks a different outcome. The existing object is imported into the intended module instance and can be planned safely.
Declare the expected resource address in the correct module and match the supported import ID form. While protecting seller applications and buyer APIs, new runs use normal logging and incident traces are stored under controlled access. The remedy may be appropriate, but that check does not establish the required recovery. The existing object is imported into the intended module instance and can be planned safely.
Inspect imported attributes and complete the intended reviewed resource configuration before apply. The first post-import plan is no-op or limited to separately approved changes without deleting the live VM. Declare the expected resource address in the correct module and match the supported import ID form; The existing object is imported into the intended module instance and can be planned safely.
Question 207
While protecting research and campus application environments, the Terraform team at a global university IT team confirms that a test cleanup script calls terraform destroy from a terminal whose active backend points at production. The team proposes to confirm backend and workspace identity and require explicit approved targeting before destructive cleanup. Service owners require a reproducible result without unsafe or unapproved production testing. Which post-change observation would establish the required infrastructure or configuration outcome?
Explanation
Correct Answer
The disposable test state is destroyed while production resources remain unchanged. Terraform workspace show and backend inspection reveal the production state is selected. Confirm backend and workspace identity and require explicit approved targeting before destructive cleanup.
Incorrect Answers
Invalid HCL never reaches apply and the corrected configuration passes validation. Terraform workspace show and backend inspection reveal the production state is selected. The disposable test state is destroyed while production resources remain unchanged.
The next successful apply converges on desired configuration without recreating already tracked objects. The disposable test state is destroyed while production resources remain unchanged.
The executed artifact hash matches the reviewed plan and unapproved later edits cannot enter the run. Terraform workspace show and backend inspection reveal the production state is selected. The disposable test state is destroyed while production resources remain unchanged.
Question 208
For payment and customer network systems at a regional bank technology group, the infrastructure platform team is investigating the following incident: a configuration requires a community provider but omits its non-HashiCorp source namespace and Terraform searches for the wrong plugin. Confirming evidence shows that terraform init reports that the inferred registry source does not contain the named provider. Service owners require a reproducible result without unsafe or unapproved production testing. Which implementation paired with its verification outcome addresses the same fault?
Explanation
Correct Answer
Set the explicit registry source address within required_providers and verify approved signatures and namespace. Initialization installs only the intended reviewed plugin with the correct registry source identity. Terraform init reports that the inferred registry source does not contain the named provider. Provider source addresses distinguish separate publisher plugins even if local names are similar.
Incorrect Answers
Set the explicit registry source address within required_providers and verify approved signatures and namespace. Multiple clean builds use the same selected provider versions until an explicitly reviewed upgrade. That uses the intended change yet measures the wrong result. Initialization installs only the intended reviewed plugin with the correct registry source identity.
Set the explicit registry source address within required_providers and verify approved signatures and namespace. The needed provider plugin is installed and the subsequent plan can ask the provider to evaluate resources. The remedy may be appropriate, but that check does not establish the required recovery. Initialization installs only the intended reviewed plugin with the correct registry source identity.
Declare an appropriate required_providers source and bounded version constraint and approve dependency-lock changes. Clean initialization resolves a tested provider release and repeat runs use consistent dependency selections. Set the explicit registry source address within required_providers and verify approved signatures and namespace; Initialization installs only the intended reviewed plugin with the correct registry source identity.
Question 209
For airfield and ticketing services at an aviation operations provider, the infrastructure platform team is investigating the following incident: a build container includes the Terraform CLI but no initialized plugin directory and attempts to plan a configuration using third-party resources. The team proposes to run terraform init in the correct root module and preserve approved dependency lock metadata. Any change must preserve the approved model contract and show measurable verification evidence. Which post-change observation would establish the required infrastructure or configuration outcome?
Explanation
Correct Answer
The needed provider plugin is installed and the subsequent plan can ask the provider to evaluate resources. A build container includes the Terraform CLI but no initialized plugin directory and attempts to plan a configuration using third-party resources. Run terraform init in the correct root module and preserve approved dependency lock metadata.
Incorrect Answers
Only a single consistent current state snapshot is used for future authorized operations. A build container includes the Terraform CLI but no initialized plugin directory and attempts to plan a configuration using third-party resources. The needed provider plugin is installed and the subsequent plan can ask the provider to evaluate resources.
The module plans against the intended tenant while the first module remains bound to its own provider. A build container includes the Terraform CLI but no initialized plugin directory and attempts to plan a configuration using third-party resources. The needed provider plugin is installed and the subsequent plan can ask the provider to evaluate resources.
Clean initialization resolves a tested provider release and repeat runs use consistent dependency selections. The needed provider plugin is installed and the subsequent plan can ask the provider to evaluate resources.
Question 210
During an authorized design and operations review at a retail banking integration team, engineers supporting branch and account technology discover that a security module uses a static nested rule block although it receives several approved ingress CIDRs. Observation: plan contains only one nested rule and ignores additional values from the approved input list. The recommendation must address the demonstrated ML failure without an unrelated pipeline redesign. Which intervention most directly addresses the underlying Terraform 1.12 infrastructure workflow failure?
Explanation
Correct Answer
Use a supported dynamic block or for_each expression to generate valid nested configuration elements. Plan contains only one nested rule and ignores additional values from the approved input list. All approved rules appear once in the generated plan without extra open ingress.
Incorrect Answers
Remove unjustified ignore_changes and make the intended rules explicit, then review the corrective plan. Plan contains only one nested rule and ignores additional values from the approved input list. Use a supported dynamic block or for_each expression to generate valid nested configuration elements.
Use explicit string keys for the typed map and test required key presence. Plan contains only one nested rule and ignores additional values from the approved input list. Use a supported dynamic block or for_each expression to generate valid nested configuration elements.
Add a Terraform variable validation condition for accepted regions and a readable error message. Plan contains only one nested rule and ignores additional values from the approved input list. Use a supported dynamic block or for_each expression to generate valid nested configuration elements.
HashiCorp Certified: Terraform Associate (004) (Terraform Associate 004) Practice Tests
- HashiCorp Terraform Associate 004 Practice Test 19 - 10 Questions (Last Reviewed 10-Nov-2026)
- HashiCorp Terraform Associate 004 Practice Test 20 - 10 Questions (Last Reviewed 09-Nov-2026)
- HashiCorp Terraform Associate 004 Practice Test 21 - 10 Questions (Last Reviewed 08-Nov-2026)
- HashiCorp Terraform Associate 004 Practice Test 22 - 10 Questions (Last Reviewed 07-Nov-2026)
- HashiCorp Terraform Associate 004 Practice Test 23 - 10 Questions (Last Reviewed 06-Nov-2026)
