HashiCorp Terraform Associate Practice Test 33
Question 320
A data platform needs to replace one instance due to verified corruption but a teammate suggests deleting the entire state file to force recreation. The team has implemented an approved Terraform change. Which observed result most directly confirms that the original requirement is now met, beyond a successful command exit code?
- The database exists only after the authorized apply completes successfully.
- The correct environment is targeted and unintended resources remain unaffected.
- The damaged instance is replaced through a reviewed plan while other state remains intact.
- Only the previously reviewed exact plan actions are applied under appropriate permissions.
Explanation
Correct Answer
C:This is the appropriate measurable post-change acceptance criterion: The damaged instance is replaced through a reviewed plan while other state remains intact. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Back up state and test impact on dependent resources.
Incorrect Answers
A:“The database exists only after the authorized apply completes successfully” would address a different Terraform configuration concern; the source instead describes A data platform needs to replace one instance due to verified corruption but a teammate suggests deleting the entire state file to force recreation. The appropriate design is to use an explicit targeted replacement request during plan for the affected managed address and inspect dependent effects. Confirm whether the damaged instance is replaced through a reviewed plan while other state remains intact.
B:“The correct environment is targeted and unintended resources remain unaffected” would address a different Terraform configuration concern; the source instead describes A data platform needs to replace one instance due to verified corruption but a teammate suggests deleting the entire state file to force recreation. The appropriate design is to use an explicit targeted replacement request during plan for the affected managed address and inspect dependent effects. Confirm whether the damaged instance is replaced through a reviewed plan while other state remains intact.
D:“Only the previously reviewed exact plan actions are applied under appropriate permissions” would address a different Terraform configuration concern; the source instead describes A data platform needs to replace one instance due to verified corruption but a teammate suggests deleting the entire state file to force recreation. The appropriate design is to use an explicit targeted replacement request during plan for the affected managed address and inspect dependent effects. Confirm whether the damaged instance is replaced through a reviewed plan while other state remains intact.
Question 321
A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode.
- Preserve actual execution plan output tied to the source revision rather than the Terraform CLI binary.
- Treat terraform plan as a preview and use approved terraform apply to execute provider changes.
- Run terraform init in the root directory to install compatible modules and providers and initialize the configured backend.
Explanation
Correct Answer
A:The proposed intervention addresses the reported Terraform engineering failure: A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. It applies the design choice Distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Review the primary diagnostic: Inspect current and desired backend storage locations. The expected outcome is: The workspace points at the intended backend without losing resource bindings. The rollout safeguard is: Back up state and coordinate lock ownership during backend changes.
Incorrect Answers
B:“Preserve actual execution plan output tied to the source revision rather than the Terraform CLI binary” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
C:“Treat terraform plan as a preview and use approved terraform apply to execute provider changes” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
D:“Run terraform init in the root directory to install compatible modules and providers and initialize the configured backend” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
Question 322
A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. Before choosing a remedy, the team needs independent evidence of the actual root cause. Which TWO checks most directly test this case? (Select TWO.)
- Inspect formatted HCL and validation results to establish their scope.
- Inspect pipeline exit-status handling and retained plan output.
- Compare state lineage and existing snapshots before choosing reconfigure or migrate-state.
- Inspect current and desired backend storage locations.
- Inspect root module source declarations and provider requirements.
Explanation
Correct Answers
C:This is directly relevant evidence for the reported behavior: Compare state lineage and existing snapshots before choosing reconfigure or migrate-state. Pair it with a separate check from the same case rather than assuming one finding proves the cause. The evidence supports or refutes the change proposal: Distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. The expected confirmation is The workspace points at the intended backend without losing resource bindings.
D:This is directly relevant evidence for the reported behavior: Inspect current and desired backend storage locations. Pair it with a separate check from the same case rather than assuming one finding proves the cause. The evidence supports or refutes the change proposal: Distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. The expected confirmation is The workspace points at the intended backend without losing resource bindings.
Incorrect Answers
A:“Inspect formatted HCL and validation results to establish their scope” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
B:“Inspect pipeline exit-status handling and retained plan output” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
E:“Inspect root module source declarations and provider requirements” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
Question 323
A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- Blind apply during investigation can overwrite emergency changes.
- Deleting configuration without reviewing the plan can cause data loss.
- Hidden delete or replace actions can cause service outages.
- Reinitializing against an empty backend can plan duplicate infrastructure.
Explanation
Correct Answer
D:The reported condition creates the specific potential exposure: Reinitializing against an empty backend can plan duplicate infrastructure. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Inspect current and desired backend storage locations. Second diagnostic: Compare state lineage and existing snapshots before choosing reconfigure or migrate-state.
Incorrect Answers
A:“Blind apply during investigation can overwrite emergency changes” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
B:“Deleting configuration without reviewing the plan can cause data loss” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
C:“Hidden delete or replace actions can cause service outages” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
Question 324
A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. A reviewer asks for BOTH a targeted technical response and a corresponding change-control safeguard. Which TWO actions together meet that requirement? (Select TWO.)
- Distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode.
- Back up state and coordinate lock ownership during backend changes.
- Inspect complete plan actions including create, update, replace and delete, not only resource additions.
- Stage capacity and verify traffic cutover prior to replacement.
- Require explicit environment confirmation and backup.
Explanation
Correct Answers
A:This is one of the two necessary decisions for a safe design: Distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Together the corrective action and its implementation safeguard need to address the recorded condition: A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. Acceptance requires The workspace points at the intended backend without losing resource bindings.
B:This is one of the two necessary decisions for a safe design: Back up state and coordinate lock ownership during backend changes. Together the corrective action and its implementation safeguard need to address the recorded condition: A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. Acceptance requires The workspace points at the intended backend without losing resource bindings.
Incorrect Answers
C:“Inspect complete plan actions including create, update, replace and delete, not only resource additions” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
D:“Stage capacity and verify traffic cutover prior to replacement” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
E:“Require explicit environment confirmation and backup” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
Question 325
A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The team has implemented an approved Terraform change. Which observed result most directly confirms that the original requirement is now met, beyond a successful command exit code?
- The approved executable plan can be applied without recomputing a different configuration.
- Nonconforming names are rejected before apply rather than merely prettified.
- Only the previously reviewed exact plan actions are applied under appropriate permissions.
- The workspace points at the intended backend without losing resource bindings.
Explanation
Correct Answer
D:This is the appropriate measurable post-change acceptance criterion: The workspace points at the intended backend without losing resource bindings. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Back up state and coordinate lock ownership during backend changes.
Incorrect Answers
A:“The approved executable plan can be applied without recomputing a different configuration” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
B:“Nonconforming names are rejected before apply rather than merely prettified” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
C:“Only the previously reviewed exact plan actions are applied under appropriate permissions” would address a different Terraform configuration concern; the source instead describes A migration changes the remote backend credentials and Terraform prompts about reinitialization, but the operator does not know whether existing state should be moved. The appropriate design is to distinguish backend reconfiguration from state migration and choose an explicit authorized terraform init mode. Confirm whether the workspace points at the intended backend without losing resource bindings.
Question 326
An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan.
- Run a read-only plan that refreshes provider observations and review the resulting drift versus configuration.
- Run terraform init in the root directory to install compatible modules and providers and initialize the configured backend.
- Preserve actual execution plan output tied to the source revision rather than the Terraform CLI binary.
Explanation
Correct Answer
A:The proposed intervention addresses the reported Terraform engineering failure: An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. It applies the design choice Generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Review the primary diagnostic: Inspect which command produced the proposed plan artifact. The expected outcome is: The approved executable plan can be applied without recomputing a different configuration. The rollout safeguard is: Protect plan artifacts and validate they were generated from approved inputs.
Incorrect Answers
B:“Run a read-only plan that refreshes provider observations and review the resulting drift versus configuration” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.
C:“Run terraform init in the root directory to install compatible modules and providers and initialize the configured backend” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.
D:“Preserve actual execution plan output tied to the source revision rather than the Terraform CLI binary” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.
Question 327
An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. Before choosing a remedy, the team needs independent evidence of the actual root cause. Which TWO checks most directly test this case? (Select TWO.)
- List addresses held in state and compare them with teardown requirements.
- Inspect the test stack resource list and outputs consumed by other stacks.
- Check the file format accepted by terraform apply and the plan's state metadata.
- Inspect formatted HCL and validation results to establish their scope.
- Inspect which command produced the proposed plan artifact.
Explanation
Correct Answers
C:This is directly relevant evidence for the reported behavior: Check the file format accepted by terraform apply and the plan's state metadata. Pair it with a separate check from the same case rather than assuming one finding proves the cause. The evidence supports or refutes the change proposal: Generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. The expected confirmation is The approved executable plan can be applied without recomputing a different configuration.
E:This is directly relevant evidence for the reported behavior: Inspect which command produced the proposed plan artifact. Pair it with a separate check from the same case rather than assuming one finding proves the cause. The evidence supports or refutes the change proposal: Generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. The expected confirmation is The approved executable plan can be applied without recomputing a different configuration.
Incorrect Answers
A:“List addresses held in state and compare them with teardown requirements” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.
B:“Inspect the test stack resource list and outputs consumed by other stacks” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.
D:“Inspect formatted HCL and validation results to establish their scope” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.
Question 328
An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- Late inspection cannot prevent destructive changes already applied.
- Deleting state loses all resource bindings and may cause uncontrolled duplicates.
- A saved plan may become stale if infrastructure or state changes in the meantime.
- Using terminal output as a plan artifact loses exact execution semantics.
Explanation
Correct Answer
D:The reported condition creates the specific potential exposure: Using terminal output as a plan artifact loses exact execution semantics. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Inspect which command produced the proposed plan artifact. Second diagnostic: Check the file format accepted by terraform apply and the plan's state metadata.
Incorrect Answers
A:“Late inspection cannot prevent destructive changes already applied” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.
B:“Deleting state loses all resource bindings and may cause uncontrolled duplicates” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.
C:“A saved plan may become stale if infrastructure or state changes in the meantime” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.
Question 329
An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. A reviewer asks for BOTH a targeted technical response and a corresponding change-control safeguard. Which TWO actions together meet that requirement? (Select TWO.)
- Require explicit approval of destructive actions before applying.
- Bind artifact, commit and variable source in one immutable release.
- Generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan.
- Protect plan artifacts and validate they were generated from approved inputs.
- Remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved.
Explanation
Correct Answers
C:This is one of the two necessary decisions for a safe design: Generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Together the corrective action and its implementation safeguard need to address the recorded condition: An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. Acceptance requires The approved executable plan can be applied without recomputing a different configuration.
D:This is one of the two necessary decisions for a safe design: Protect plan artifacts and validate they were generated from approved inputs. Together the corrective action and its implementation safeguard need to address the recorded condition: An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. Acceptance requires The approved executable plan can be applied without recomputing a different configuration.
Incorrect Answers
A:“Require explicit approval of destructive actions before applying” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.
B:“Bind artifact, commit and variable source in one immutable release” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.
E:“Remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.
Question 330
An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The team has implemented an approved Terraform change. Which observed result most directly confirms that the original requirement is now met, beyond a successful command exit code?
- The approved executable plan can be applied without recomputing a different configuration.
- The obsolete resource is identified for authorized decommissioning with explicit impact review.
- Unused test infrastructure is removed without deleting active shared dependencies.
- The workflow distinguishes formatting from configuration validation.
Explanation
Correct Answer
A:This is the appropriate measurable post-change acceptance criterion: The approved executable plan can be applied without recomputing a different configuration. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Protect plan artifacts and validate they were generated from approved inputs.
Incorrect Answers
B:“The obsolete resource is identified for authorized decommissioning with explicit impact review” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.
C:“Unused test infrastructure is removed without deleting active shared dependencies” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.
D:“The workflow distinguishes formatting from configuration validation” would address a different Terraform configuration concern; the source instead describes An infrastructure team saves the output of terraform plan to a text file and assumes that plaintext file can later be passed to terraform apply as an immutable plan. The appropriate design is to generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan. Confirm whether the approved executable plan can be applied without recomputing a different configuration.