HashiCorp Terraform Associate Practice Test 38
Question 370
A developer's configuration is syntactically correct but the planned resource names violate a project naming convention, and CI only runs terraform fmt. 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?
- Approval decisions account for every infrastructure action category.
- The correct environment is targeted and unintended resources remain unaffected.
- Nonconforming names are rejected before apply rather than merely prettified.
- The team evaluates the planned resource actions before execution.
Explanation
Correct Answer
C:This is the appropriate measurable post-change acceptance criterion: Nonconforming names are rejected before apply rather than merely prettified. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Test policy and custom conditions on valid and invalid inputs.
Incorrect Answers
A:“Approval decisions account for every infrastructure action category” would address a different Terraform configuration concern; the source instead describes A developer's configuration is syntactically correct but the planned resource names violate a project naming convention, and CI only runs terraform fmt. The appropriate design is to combine fmt/validate with custom input rules or plan-level policy checks that test business naming requirements. Confirm whether nonconforming names are rejected before apply rather than merely prettified.
B:“The correct environment is targeted and unintended resources remain unaffected” would address a different Terraform configuration concern; the source instead describes A developer's configuration is syntactically correct but the planned resource names violate a project naming convention, and CI only runs terraform fmt. The appropriate design is to combine fmt/validate with custom input rules or plan-level policy checks that test business naming requirements. Confirm whether nonconforming names are rejected before apply rather than merely prettified.
D:“The team evaluates the planned resource actions before execution” would address a different Terraform configuration concern; the source instead describes A developer's configuration is syntactically correct but the planned resource names violate a project naming convention, and CI only runs terraform fmt. The appropriate design is to combine fmt/validate with custom input rules or plan-level policy checks that test business naming requirements. Confirm whether nonconforming names are rejected before apply rather than merely prettified.
Question 371
A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Use terraform console to evaluate expressions in context and plan/apply to manage actual infrastructure.
- Assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning.
- Remove the obsolete resource declaration in a reviewed change and inspect terraform plan for a destroy action, without applying until approved.
- Use terraform validate for configuration integrity and add provider-aware plan plus separate environment and policy checks for real-world CIDR conflicts.
Explanation
Correct Answer
B:The proposed intervention addresses the reported Terraform engineering failure: A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. It applies the design choice Assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Review the primary diagnostic: Inspect the test stack resource list and outputs consumed by other stacks. The expected outcome is: Unused test infrastructure is removed without deleting active shared dependencies. The rollout safeguard is: Coordinate consumer migration and get teardown approval.
Incorrect Answers
A:“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 platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
C:“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 platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
D:“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 platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
Question 372
A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. 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 test stack resource list and outputs consumed by other stacks.
- Inspect formatted HCL and validation results to establish their scope.
- Inspect the plan's state lineage and serialization information.
- Check actual infrastructure dependency and change-review records.
- Inspect pipeline exit-status handling and retained plan output.
Explanation
Correct Answers
A:This is directly relevant evidence for the reported behavior: Inspect the test stack resource list and outputs consumed by other stacks. 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: Assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. The expected confirmation is Unused test infrastructure is removed without deleting active shared dependencies.
D:This is directly relevant evidence for the reported behavior: Check actual infrastructure dependency and change-review records. 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: Assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. The expected confirmation is Unused test infrastructure is removed without deleting active shared dependencies.
Incorrect Answers
B:“Inspect formatted HCL and validation results to establish their scope” would address a different Terraform configuration concern; the source instead describes A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
C:“Inspect the plan's state lineage and serialization information” would address a different Terraform configuration concern; the source instead describes A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
E:“Inspect pipeline exit-status handling and retained plan output” would address a different Terraform configuration concern; the source instead describes A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
Question 373
A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- State boundaries do not automatically reflect all real application dependencies.
- Deleting configuration without reviewing the plan can cause data loss.
- Replanning with different variables can bypass review of actual changes.
- Static validation does not guarantee external cloud constraints are satisfied.
Explanation
Correct Answer
A:The reported condition creates the specific potential exposure: State boundaries do not automatically reflect all real application dependencies. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Inspect the test stack resource list and outputs consumed by other stacks. Second diagnostic: Check actual infrastructure dependency and change-review records.
Incorrect Answers
B:“Deleting configuration without reviewing the plan can cause data loss” would address a different Terraform configuration concern; the source instead describes A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
C:“Replanning with different variables can bypass review of actual changes” would address a different Terraform configuration concern; the source instead describes A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
D:“Static validation does not guarantee external cloud constraints are satisfied” would address a different Terraform configuration concern; the source instead describes A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
Question 374
A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. A reviewer asks for BOTH a targeted technical response and a corresponding change-control safeguard. Which TWO actions together meet that requirement? (Select TWO.)
- Coordinate consumer migration and get teardown approval.
- Assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning.
- Use an explicit targeted replacement request during plan for the affected managed address and inspect dependent effects.
- Require artifacts with immutable commit and plan identifiers.
- Add positive and negative test cases for validation rules.
Explanation
Correct Answers
A:This is one of the two necessary decisions for a safe design: Coordinate consumer migration and get teardown approval. Together the corrective action and its implementation safeguard need to address the recorded condition: A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. Acceptance requires Unused test infrastructure is removed without deleting active shared dependencies.
B:This is one of the two necessary decisions for a safe design: Assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Together the corrective action and its implementation safeguard need to address the recorded condition: A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. Acceptance requires Unused test infrastructure is removed without deleting active shared dependencies.
Incorrect Answers
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 platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
D:“Require artifacts with immutable commit and plan identifiers” would address a different Terraform configuration concern; the source instead describes A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
E:“Add positive and negative test cases for validation rules” would address a different Terraform configuration concern; the source instead describes A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
Question 375
A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. 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?
- Approval decisions account for every infrastructure action category.
- Automation correctly differentiates no changes, planned changes and failure.
- Unused test infrastructure is removed without deleting active shared dependencies.
- The correct environment is targeted and unintended resources remain unaffected.
Explanation
Correct Answer
C:This is the appropriate measurable post-change acceptance criterion: Unused test infrastructure is removed without deleting active shared dependencies. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Coordinate consumer migration and get teardown approval.
Incorrect Answers
A:“Approval decisions account for every infrastructure action category” would address a different Terraform configuration concern; the source instead describes A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
B:“Automation correctly differentiates no changes, planned changes and failure” would address a different Terraform configuration concern; the source instead describes A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
D:“The correct environment is targeted and unintended resources remain unaffected” would address a different Terraform configuration concern; the source instead describes A platform operator wants to take infrastructure from a disposable test stack but plans to run terraform destroy without considering references held by a separate application stack. The appropriate design is to assess state ownership and external dependencies, then review an explicit teardown plan before decommissioning. Confirm whether unused test infrastructure is removed without deleting active shared dependencies.
Question 376
A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Use a suitable postcondition on the relevant managed value to verify the resulting attribute.
- Treat sensitive as output redaction rather than encryption or state omission and protect state plus plan artifacts.
- Use a managed resource block to declare the new network and reserve data blocks for reading existing objects.
- Reference the managed load balancer attribute from the firewall rule to express the correct dependency.
Explanation
Correct Answer
C:The proposed intervention addresses the reported Terraform engineering failure: A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. It applies the design choice Use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Review the primary diagnostic: Check whether the intended network ID already exists in the provider API. The expected outcome is: Terraform plans creation of the intended network rather than failing a lookup. The rollout safeguard is: Validate provider resource requirements and review the plan.
Incorrect Answers
A:“Use a suitable postcondition on the relevant managed value to verify the resulting attribute” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.
B:“Treat sensitive as output redaction rather than encryption or state omission and protect state plus plan artifacts” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.
D:“Reference the managed load balancer attribute from the firewall rule to express the correct dependency” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.
Question 377
A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. 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 actual computed output and supported condition context.
- Inspect which map keys are required versus optional.
- Check whether the intended network ID already exists in the provider API.
- Inspect example input values and expected data types.
- Inspect the block type and the plan for a resource-create action.
Explanation
Correct Answers
C:This is directly relevant evidence for the reported behavior: Check whether the intended network ID already exists in the provider API. 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 a managed resource block to declare the new network and reserve data blocks for reading existing objects. The expected confirmation is Terraform plans creation of the intended network rather than failing a lookup.
E:This is directly relevant evidence for the reported behavior: Inspect the block type and the plan for a resource-create action. 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 a managed resource block to declare the new network and reserve data blocks for reading existing objects. The expected confirmation is Terraform plans creation of the intended network rather than failing a lookup.
Incorrect Answers
A:“Inspect the actual computed output and supported condition context” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.
B:“Inspect which map keys are required versus optional” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.
D:“Inspect example input values and expected data types” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.
Question 378
A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- Duplicated resource declarations can create conflicting objects.
- Index churn may cause unnecessary destructive replacements.
- Sensitive flags alone do not prevent secret persistence in state.
- A data source cannot substitute for declaring a new managed object.
Explanation
Correct Answer
D:The reported condition creates the specific potential exposure: A data source cannot substitute for declaring a new managed object. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Check whether the intended network ID already exists in the provider API. Second diagnostic: Inspect the block type and the plan for a resource-create action.
Incorrect Answers
A:“Duplicated resource declarations can create conflicting objects” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.
B:“Index churn may cause unnecessary destructive replacements” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.
C:“Sensitive flags alone do not prevent secret persistence in state” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.
Question 379
A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. 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 a managed resource block to declare the new network and reserve data blocks for reading existing objects.
- Use an appropriate check block and differentiate diagnostic health assertions from strict preconditions.
- Test name strategy and dependent references before apply.
- Use provider safeguards and backups in addition to plan checks.
- Validate provider resource requirements and review the plan.
Explanation
Correct Answers
A:This is one of the two necessary decisions for a safe design: Use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Together the corrective action and its implementation safeguard need to address the recorded condition: A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. Acceptance requires Terraform plans creation of the intended network rather than failing a lookup.
E:This is one of the two necessary decisions for a safe design: Validate provider resource requirements and review the plan. Together the corrective action and its implementation safeguard need to address the recorded condition: A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. Acceptance requires Terraform plans creation of the intended network rather than failing a lookup.
Incorrect Answers
B:“Use an appropriate check block and differentiate diagnostic health assertions from strict preconditions” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.
C:“Test name strategy and dependent references before apply” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.
D:“Use provider safeguards and backups in addition to plan checks” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.
Question 380
A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. 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 child receives the intended environment value independent of naming coincidence.
- Either branch produces a consistent list suitable for downstream resources.
- Every approved rule is represented without hand-copied configuration drift.
- Terraform plans creation of the intended network rather than failing a lookup.
Explanation
Correct Answer
D:This is the appropriate measurable post-change acceptance criterion: Terraform plans creation of the intended network rather than failing a lookup. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Validate provider resource requirements and review the plan.
Incorrect Answers
A:“The child receives the intended environment value independent of naming coincidence” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.
B:“Either branch produces a consistent list suitable for downstream resources” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.
C:“Every approved rule is represented without hand-copied configuration drift” would address a different Terraform configuration concern; the source instead describes A service module must create a new virtual network, but its author uses a Terraform data block pointing to a network that does not exist. The appropriate design is to use a managed resource block to declare the new network and reserve data blocks for reading existing objects. Confirm whether terraform plans creation of the intended network rather than failing a lookup.