HashiCorp Terraform Associate Practice Test 29
Question 280
A developer runs terraform apply -auto-approve against a shared production root merely to suppress interactive prompts in a nightly workflow. 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 working directory initializes cleanly before validation and planning.
- Automation runs without prompts only after separate accountable change authorization.
- The new plan matches the current infrastructure and approved configuration.
- Invalid inputs are rejected before a risky provisioning attempt.
Explanation
Correct Answer
B:This is the appropriate measurable post-change acceptance criterion: Automation runs without prompts only after separate accountable change authorization. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Use least-privilege CI identity and preserved audit logs.
Incorrect Answers
A:“The working directory initializes cleanly before validation and planning” would address a different Terraform configuration concern; the source instead describes A developer runs terraform apply -auto-approve against a shared production root merely to suppress interactive prompts in a nightly workflow. The appropriate design is to require a controlled automated approval gate with a reviewed plan artifact rather than using the flag as an authorization substitute. Confirm whether automation runs without prompts only after separate accountable change authorization.
C:“The new plan matches the current infrastructure and approved configuration” would address a different Terraform configuration concern; the source instead describes A developer runs terraform apply -auto-approve against a shared production root merely to suppress interactive prompts in a nightly workflow. The appropriate design is to require a controlled automated approval gate with a reviewed plan artifact rather than using the flag as an authorization substitute. Confirm whether automation runs without prompts only after separate accountable change authorization.
D:“Invalid inputs are rejected before a risky provisioning attempt” would address a different Terraform configuration concern; the source instead describes A developer runs terraform apply -auto-approve against a shared production root merely to suppress interactive prompts in a nightly workflow. The appropriate design is to require a controlled automated approval gate with a reviewed plan artifact rather than using the flag as an authorization substitute. Confirm whether automation runs without prompts only after separate accountable change authorization.
Question 281
A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Inspect the complete destroy plan for the selected state scope before running terraform destroy.
- Generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan.
- Use terraform console to evaluate expressions in context and plan/apply to manage actual infrastructure.
- Remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved.
Explanation
Correct Answer
A:The proposed intervention addresses the reported Terraform engineering failure: A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. It applies the design choice Inspect the complete destroy plan for the selected state scope before running terraform destroy. Review the primary diagnostic: List addresses held in state and compare them with teardown requirements. The expected outcome is: Only resources legitimately owned by the targeted state are intentionally destroyed. The rollout safeguard is: Require explicit teardown approval and documented restoration prerequisites.
Incorrect Answers
B:“Generate a binary plan artifact with -out rather than treating printed human-readable output as an executable plan” would address a different Terraform configuration concern; the source instead describes A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
C:“Use terraform console to evaluate expressions in context and plan/apply to manage actual infrastructure” would address a different Terraform configuration concern; the source instead describes A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
D:“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 A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
Question 282
A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. Before choosing a remedy, the team needs independent evidence of the actual root cause. Which TWO checks most directly test this case? (Select TWO.)
- Review the destroy plan for retained shared data sources and actual managed resources.
- Inspect the plan's state lineage and serialization information.
- Inspect current and desired backend storage locations.
- List addresses held in state and compare them with teardown requirements.
- Inspect the test stack resource list and outputs consumed by other stacks.
Explanation
Correct Answers
A:This is directly relevant evidence for the reported behavior: Review the destroy plan for retained shared data sources and actual managed resources. 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: Inspect the complete destroy plan for the selected state scope before running terraform destroy. The expected confirmation is Only resources legitimately owned by the targeted state are intentionally destroyed.
D:This is directly relevant evidence for the reported behavior: List addresses held in state and compare them with teardown requirements. 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: Inspect the complete destroy plan for the selected state scope before running terraform destroy. The expected confirmation is Only resources legitimately owned by the targeted state are intentionally destroyed.
Incorrect Answers
B:“Inspect the plan's state lineage and serialization information” would address a different Terraform configuration concern; the source instead describes A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
C:“Inspect current and desired backend storage locations” would address a different Terraform configuration concern; the source instead describes A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
E:“Inspect the test stack resource list and outputs consumed by other stacks” would address a different Terraform configuration concern; the source instead describes A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
Question 283
A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- Skipping initialization can leave required dependencies unavailable.
- Invalid evidence can conceal unreviewed changes.
- A broad destroy may remove shared infrastructure still used by other systems.
- Deleting state loses all resource bindings and may cause uncontrolled duplicates.
Explanation
Correct Answer
C:The reported condition creates the specific potential exposure: A broad destroy may remove shared infrastructure still used by other systems. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: List addresses held in state and compare them with teardown requirements. Second diagnostic: Review the destroy plan for retained shared data sources and actual managed resources.
Incorrect Answers
A:“Skipping initialization can leave required dependencies unavailable” would address a different Terraform configuration concern; the source instead describes A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
B:“Invalid evidence can conceal unreviewed changes” would address a different Terraform configuration concern; the source instead describes A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
D:“Deleting state loses all resource bindings and may cause uncontrolled duplicates” would address a different Terraform configuration concern; the source instead describes A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
Question 284
A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. 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 teardown approval and documented restoration prerequisites.
- Review the provider's ForceNew or replacement behavior and the plan reason before accepting the action.
- Inspect the complete destroy plan for the selected state scope before running terraform destroy.
- Test policy and custom conditions on valid and invalid inputs.
- Require explicit approval of destructive actions before applying.
Explanation
Correct Answers
A:This is one of the two necessary decisions for a safe design: Require explicit teardown approval and documented restoration prerequisites. Together the corrective action and its implementation safeguard need to address the recorded condition: A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. Acceptance requires Only resources legitimately owned by the targeted state are intentionally destroyed.
C:This is one of the two necessary decisions for a safe design: Inspect the complete destroy plan for the selected state scope before running terraform destroy. Together the corrective action and its implementation safeguard need to address the recorded condition: A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. Acceptance requires Only resources legitimately owned by the targeted state are intentionally destroyed.
Incorrect Answers
B:“Review the provider's ForceNew or replacement behavior and the plan reason before accepting the action” would address a different Terraform configuration concern; the source instead describes A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
D:“Test policy and custom conditions on valid and invalid inputs” would address a different Terraform configuration concern; the source instead describes A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
E:“Require explicit approval of destructive actions before applying” would address a different Terraform configuration concern; the source instead describes A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
Question 285
A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. 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?
- CI flags improperly formatted files without silently modifying submitted changes.
- Approved capacity values match deployed resource sizes.
- 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.
Explanation
Correct Answer
D:This is the appropriate measurable post-change acceptance criterion: Only resources legitimately owned by the targeted state are intentionally destroyed. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Require explicit teardown approval and documented restoration prerequisites.
Incorrect Answers
A:“CI flags improperly formatted files without silently modifying submitted changes” would address a different Terraform configuration concern; the source instead describes A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
B:“Approved capacity values match deployed resource sizes” would address a different Terraform configuration concern; the source instead describes A shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
C:“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 shared infrastructure stack references a database not managed by the current root, and the team wants to delete only the entire stack's test resources during cleanup. The appropriate design is to inspect the complete destroy plan for the selected state scope before running terraform destroy. Confirm whether only resources legitimately owned by the targeted state are intentionally destroyed.
Question 286
A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Use terraform fmt -check -recursive as a non-mutating formatting gate and run formatter explicitly in development.
- Review the provider's ForceNew or replacement behavior and the plan reason before accepting the action.
- Use an explicit targeted replacement request during plan for the affected managed address and inspect dependent effects.
- Assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning.
Explanation
Correct Answer
B:The proposed intervention addresses the reported Terraform engineering failure: A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. It applies the design choice Review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Review the primary diagnostic: Inspect plan before/after values and replace action markers. The expected outcome is: The team understands replacement impact and can choose a safer migration if required. The rollout safeguard is: Stage capacity and verify traffic cutover prior to replacement.
Incorrect Answers
A:“Use terraform fmt -check -recursive as a non-mutating formatting gate and run formatter explicitly in development” would address a different Terraform configuration concern; the source instead describes A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.
C:“Use an explicit targeted replacement request during plan for the affected managed address and inspect dependent effects” would address a different Terraform configuration concern; the source instead describes A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.
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 branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.
Question 287
A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. 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 the saved plan output and proposed create/update/destroy summary.
- Inspect plan before/after values and replace action markers.
- Read the provider resource schema for whether the changed attribute is immutable.
- Inspect CI approval evidence and the exact configuration revision applied.
- Review the resource address and its current state binding.
Explanation
Correct Answers
B:This is directly relevant evidence for the reported behavior: Inspect plan before/after values and replace action markers. 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: Review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. The expected confirmation is The team understands replacement impact and can choose a safer migration if required.
C:This is directly relevant evidence for the reported behavior: Read the provider resource schema for whether the changed attribute is immutable. 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: Review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. The expected confirmation is The team understands replacement impact and can choose a safer migration if required.
Incorrect Answers
A:“Inspect the saved plan output and proposed create/update/destroy summary” would address a different Terraform configuration concern; the source instead describes A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.
D:“Inspect CI approval evidence and the exact configuration revision applied” would address a different Terraform configuration concern; the source instead describes A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.
E:“Review the resource address and its current state binding” would address a different Terraform configuration concern; the source instead describes A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.
Question 288
A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. 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.
- Skipping initialization can leave required dependencies unavailable.
- Auto approval does not reduce the danger of an incorrect infrastructure plan.
- Assuming every attribute change is in place may cause unplanned downtime.
Explanation
Correct Answer
D:The reported condition creates the specific potential exposure: Assuming every attribute change is in place may cause unplanned downtime. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Inspect plan before/after values and replace action markers. Second diagnostic: Read the provider resource schema for whether the changed attribute is immutable.
Incorrect Answers
A:“Blind apply during investigation can overwrite emergency changes” would address a different Terraform configuration concern; the source instead describes A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.
B:“Skipping initialization can leave required dependencies unavailable” would address a different Terraform configuration concern; the source instead describes A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.
C:“Auto approval does not reduce the danger of an incorrect infrastructure plan” would address a different Terraform configuration concern; the source instead describes A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.
Question 289
A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. 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 terraform validate for configuration integrity and add provider-aware plan plus separate environment and policy checks for real-world CIDR conflicts.
- Review the provider's ForceNew or replacement behavior and the plan reason before accepting the action.
- Stage capacity and verify traffic cutover prior to replacement.
- Run both checks and review actual plan behavior.
- Require explicit approval of destructive actions before applying.
Explanation
Correct Answers
B:This is one of the two necessary decisions for a safe design: Review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Together the corrective action and its implementation safeguard need to address the recorded condition: A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. Acceptance requires The team understands replacement impact and can choose a safer migration if required.
C:This is one of the two necessary decisions for a safe design: Stage capacity and verify traffic cutover prior to replacement. Together the corrective action and its implementation safeguard need to address the recorded condition: A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. Acceptance requires The team understands replacement impact and can choose a safer migration if required.
Incorrect Answers
A:“Use terraform validate for configuration integrity and add provider-aware plan plus separate environment and policy checks for real-world CIDR conflicts” would address a different Terraform configuration concern; the source instead describes A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.
D:“Run both checks and review actual plan behavior” would address a different Terraform configuration concern; the source instead describes A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.
E:“Require explicit approval of destructive actions before applying” would address a different Terraform configuration concern; the source instead describes A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.
Question 290
A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. 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 team understands replacement impact and can choose a safer migration if required.
- Nonconforming names are rejected before apply rather than merely prettified.
- Unused test infrastructure is removed without deleting active shared dependencies.
- A review identifies both syntactic correctness and operational network conflicts.
Explanation
Correct Answer
A:This is the appropriate measurable post-change acceptance criterion: The team understands replacement impact and can choose a safer migration if required. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Stage capacity and verify traffic cutover prior to replacement.
Incorrect Answers
B:“Nonconforming names are rejected before apply rather than merely prettified” would address a different Terraform configuration concern; the source instead describes A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.
C:“Unused test infrastructure is removed without deleting active shared dependencies” would address a different Terraform configuration concern; the source instead describes A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.
D:“A review identifies both syntactic correctness and operational network conflicts” would address a different Terraform configuration concern; the source instead describes A branch network team changes a tag in source code but the planned result proposes replacing a virtual router rather than editing it in place. The appropriate design is to review the provider's ForceNew or replacement behavior and the plan reason before accepting the action. Confirm whether the team understands replacement impact and can choose a safer migration if required.