HashiCorp Terraform Associate Practice Test 31
Question 300
An operator adds a new module call and assumes terraform fmt will also check that the referenced provider exists and the module's inputs have valid types. 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?
- Only resources legitimately owned by the targeted state are intentionally destroyed.
- Automation runs without prompts only after separate accountable change authorization.
- The workflow distinguishes formatting from configuration validation.
- The team understands replacement impact and can choose a safer migration if required.
Explanation
Correct Answer
C:This is the appropriate measurable post-change acceptance criterion: The workflow distinguishes formatting from configuration validation. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Run both checks and review actual plan behavior.
Incorrect Answers
A:“Only resources legitimately owned by the targeted state are intentionally destroyed” would address a different Terraform configuration concern; the source instead describes An operator adds a new module call and assumes terraform fmt will also check that the referenced provider exists and the module's inputs have valid types. The appropriate design is to use fmt only for styling and use init plus validate for dependency and configuration checks. Confirm whether the workflow distinguishes formatting from configuration validation.
B:“Automation runs without prompts only after separate accountable change authorization” would address a different Terraform configuration concern; the source instead describes An operator adds a new module call and assumes terraform fmt will also check that the referenced provider exists and the module's inputs have valid types. The appropriate design is to use fmt only for styling and use init plus validate for dependency and configuration checks. Confirm whether the workflow distinguishes formatting from configuration validation.
D:“The team understands replacement impact and can choose a safer migration if required” would address a different Terraform configuration concern; the source instead describes An operator adds a new module call and assumes terraform fmt will also check that the referenced provider exists and the module's inputs have valid types. The appropriate design is to use fmt only for styling and use init plus validate for dependency and configuration checks. Confirm whether the workflow distinguishes formatting from configuration validation.
Question 301
A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one.
- Preserve actual execution plan output tied to the source revision rather than the Terraform CLI binary.
- Inspect complete plan actions including create, update, replace and delete, not only resource additions.
- Combine fmt/validate with custom input rules or plan-level policy checks that test business naming requirements.
Explanation
Correct Answer
A:The proposed intervention addresses the reported Terraform engineering failure: A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. It applies the design choice Use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Review the primary diagnostic: Inspect pipeline exit-status handling and retained plan output. The expected outcome is: Automation correctly differentiates no changes, planned changes and failure. The rollout safeguard is: Define CI branch behavior for each documented status.
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 delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
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 delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
D:“Combine fmt/validate with custom input rules or plan-level policy checks that test business naming requirements” would address a different Terraform configuration concern; the source instead describes A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
Question 302
A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. 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 pipeline exit-status handling and retained plan output.
- Inspect the saved plan output and proposed create/update/destroy summary.
- Inspect plan before/after values and replace action markers.
- Check the CI artifact's file type and creation command.
- Reproduce a no-change, changes-present and error scenario in a test workspace.
Explanation
Correct Answers
A:This is directly relevant evidence for the reported behavior: Inspect pipeline exit-status handling and retained plan output. 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: Use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. The expected confirmation is Automation correctly differentiates no changes, planned changes and failure.
E:This is directly relevant evidence for the reported behavior: Reproduce a no-change, changes-present and error scenario in a test workspace. 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: Use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. The expected confirmation is Automation correctly differentiates no changes, planned changes and failure.
Incorrect Answers
B:“Inspect the saved plan output and proposed create/update/destroy summary” would address a different Terraform configuration concern; the source instead describes A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
C:“Inspect plan before/after values and replace action markers” would address a different Terraform configuration concern; the source instead describes A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
D:“Check the CI artifact's file type and creation command” would address a different Terraform configuration concern; the source instead describes A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
Question 303
A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- Assuming every attribute change is in place may cause unplanned downtime.
- A saved plan may become stale if infrastructure or state changes in the meantime.
- Treating exit code two as a generic error can reject valid reviewed changes.
- Static validation does not guarantee external cloud constraints are satisfied.
Explanation
Correct Answer
C:The reported condition creates the specific potential exposure: Treating exit code two as a generic error can reject valid reviewed changes. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Inspect pipeline exit-status handling and retained plan output. Second diagnostic: Reproduce a no-change, changes-present and error scenario in a test workspace.
Incorrect Answers
A:“Assuming every attribute change is in place may cause unplanned downtime” would address a different Terraform configuration concern; the source instead describes A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
B:“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 A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
D:“Static validation does not guarantee external cloud constraints are satisfied” would address a different Terraform configuration concern; the source instead describes A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
Question 304
A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. A reviewer asks for BOTH a targeted technical response and a corresponding change-control safeguard. Which TWO actions together meet that requirement? (Select TWO.)
- Use test workspaces and avoid displaying secrets in console sessions.
- Define CI branch behavior for each documented status.
- Protect plan artifacts and validate they were generated from approved inputs.
- Use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one.
- Set variables from controlled approved inputs and apply the exact saved plan made with those values.
Explanation
Correct Answers
B:This is one of the two necessary decisions for a safe design: Define CI branch behavior for each documented status. Together the corrective action and its implementation safeguard need to address the recorded condition: A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. Acceptance requires Automation correctly differentiates no changes, planned changes and failure.
D:This is one of the two necessary decisions for a safe design: Use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Together the corrective action and its implementation safeguard need to address the recorded condition: A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. Acceptance requires Automation correctly differentiates no changes, planned changes and failure.
Incorrect Answers
A:“Use test workspaces and avoid displaying secrets in console sessions” would address a different Terraform configuration concern; the source instead describes A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
C:“Protect plan artifacts and validate they were generated from approved inputs” would address a different Terraform configuration concern; the source instead describes A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
E:“Set variables from controlled approved inputs and apply the exact saved plan made with those values” would address a different Terraform configuration concern; the source instead describes A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
Question 305
A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. 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 obsolete resource is identified for authorized decommissioning with explicit impact review.
- Unused test infrastructure is removed without deleting active shared dependencies.
- A review identifies both syntactic correctness and operational network conflicts.
- Automation correctly differentiates no changes, planned changes and failure.
Explanation
Correct Answer
D:This is the appropriate measurable post-change acceptance criterion: Automation correctly differentiates no changes, planned changes and failure. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Define CI branch behavior for each documented status.
Incorrect Answers
A:“The obsolete resource is identified for authorized decommissioning with explicit impact review” would address a different Terraform configuration concern; the source instead describes A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
B:“Unused test infrastructure is removed without deleting active shared dependencies” would address a different Terraform configuration concern; the source instead describes A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
C:“A review identifies both syntactic correctness and operational network conflicts” would address a different Terraform configuration concern; the source instead describes A delivery pipeline must fail when a reviewed plan has infrastructure changes but succeed without manual intervention when it is a no-op. The appropriate design is to use terraform plan -detailed-exitcode with explicit handling of codes zero, two and one. Confirm whether automation correctly differentiates no changes, planned changes and failure.
Question 306
A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved.
- Set variables from controlled approved inputs and apply the exact saved plan made with those values.
- Require a controlled automated approval gate with a reviewed plan artifact rather than using the flag as an authorization substitute.
- Treat terraform plan as a preview and use approved terraform apply to execute provider changes.
Explanation
Correct Answer
A:The proposed intervention addresses the reported Terraform engineering failure: A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. It applies the design choice Remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Review the primary diagnostic: Review the resource address and its current state binding. The expected outcome is: The obsolete resource is identified for authorized decommissioning with explicit impact review. The rollout safeguard is: Confirm backups and downstream references before any apply.
Incorrect Answers
B:“Set variables from controlled approved inputs and apply the exact saved plan made with those values” would address a different Terraform configuration concern; the source instead describes A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.
C:“Require a controlled automated approval gate with a reviewed plan artifact rather than using the flag as an authorization substitute” would address a different Terraform configuration concern; the source instead describes A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.
D:“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 production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.
Question 307
A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. 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 whether a saved binary plan exists for the change.
- Review the resource address and its current state binding.
- Inspect plan actions and dependencies of the instance targeted for deletion.
- Inspect the CI job arguments and whether source files change during validation.
- Inspect terraform workspace show and actual backend identity.
Explanation
Correct Answers
B:This is directly relevant evidence for the reported behavior: Review the resource address and its current state binding. 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: Remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. The expected confirmation is The obsolete resource is identified for authorized decommissioning with explicit impact review.
C:This is directly relevant evidence for the reported behavior: Inspect plan actions and dependencies of the instance targeted for deletion. 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: Remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. The expected confirmation is The obsolete resource is identified for authorized decommissioning with explicit impact review.
Incorrect Answers
A:“Inspect whether a saved binary plan exists for the change” would address a different Terraform configuration concern; the source instead describes A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.
D:“Inspect the CI job arguments and whether source files change during validation” would address a different Terraform configuration concern; the source instead describes A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.
E:“Inspect terraform workspace show and actual backend identity” would address a different Terraform configuration concern; the source instead describes A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.
Question 308
A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- Implicit assumptions allow misconfigured resources to enter review.
- Destroying from the wrong state can remove live production services.
- Replanning with different variables can bypass review of actual changes.
- Deleting configuration without reviewing the plan can cause data loss.
Explanation
Correct Answer
D:The reported condition creates the specific potential exposure: Deleting configuration without reviewing the plan can cause data loss. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Review the resource address and its current state binding. Second diagnostic: Inspect plan actions and dependencies of the instance targeted for deletion.
Incorrect Answers
A:“Implicit assumptions allow misconfigured resources to enter review” would address a different Terraform configuration concern; the source instead describes A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.
B:“Destroying from the wrong state can remove live production services” would address a different Terraform configuration concern; the source instead describes A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.
C:“Replanning with different variables can bypass review of actual changes” would address a different Terraform configuration concern; the source instead describes A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.
Question 309
A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. A reviewer asks for BOTH a targeted technical response and a corresponding change-control safeguard. Which TWO actions together meet that requirement? (Select TWO.)
- Remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved.
- Confirm backups and downstream references before any apply.
- Require environment checks and plan review before apply.
- Assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning.
- Protect plan artifacts and validate they were generated from approved inputs.
Explanation
Correct Answers
A:This is one of the two necessary decisions for a safe design: Remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Together the corrective action and its implementation safeguard need to address the recorded condition: A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. Acceptance requires The obsolete resource is identified for authorized decommissioning with explicit impact review.
B:This is one of the two necessary decisions for a safe design: Confirm backups and downstream references before any apply. Together the corrective action and its implementation safeguard need to address the recorded condition: A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. Acceptance requires The obsolete resource is identified for authorized decommissioning with explicit impact review.
Incorrect Answers
C:“Require environment checks and plan review before apply” would address a different Terraform configuration concern; the source instead describes A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.
D:“Assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning” would address a different Terraform configuration concern; the source instead describes A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.
E:“Protect plan artifacts and validate they were generated from approved inputs” would address a different Terraform configuration concern; the source instead describes A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.
Question 310
A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. 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 obsolete resource is identified for authorized decommissioning with explicit impact review.
- The damaged instance is replaced through a reviewed plan while other state remains intact.
- Only resources legitimately owned by the targeted state are intentionally destroyed.
- The approved executable plan can be applied without recomputing a different configuration.
Explanation
Correct Answer
A:This is the appropriate measurable post-change acceptance criterion: The obsolete resource is identified for authorized decommissioning with explicit impact review. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Confirm backups and downstream references before any apply.
Incorrect Answers
B:“The damaged instance is replaced through a reviewed plan while other state remains intact” would address a different Terraform configuration concern; the source instead describes A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.
C:“Only resources legitimately owned by the targeted state are intentionally destroyed” would address a different Terraform configuration concern; the source instead describes A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.
D:“The approved executable plan can be applied without recomputing a different configuration” would address a different Terraform configuration concern; the source instead describes A production app accidentally has an obsolete instance left in configuration and the team wants to see what will be deleted without applying the removal yet. The appropriate design is to remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved. Confirm whether the obsolete resource is identified for authorized decommissioning with explicit impact review.