HashiCorp Terraform Associate Practice Test 21
Question 200
A remote-managed application is changed through an admin console, and the next Terraform plan reports different tags from the previously recorded state. 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 can distinguish observed drift from intentional configuration changes.
- Each resource is planned against the approved primary or recovery account.
- Operators distinguish last known state from live infrastructure observations.
- The data lookup evaluates against the intended region and account.
Explanation
Correct Answer
A:This is the appropriate measurable post-change acceptance criterion: The team can distinguish observed drift from intentional configuration changes. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Investigate the out-of-band change before choosing reconciliation.
Incorrect Answers
B:“Each resource is planned against the approved primary or recovery account” would address a different Terraform configuration concern; the source instead describes A remote-managed application is changed through an admin console, and the next Terraform plan reports different tags from the previously recorded state. The appropriate design is to treat refresh and planning as comparisons between configuration, state and current provider observations. Confirm whether the team can distinguish observed drift from intentional configuration changes.
C:“Operators distinguish last known state from live infrastructure observations” would address a different Terraform configuration concern; the source instead describes A remote-managed application is changed through an admin console, and the next Terraform plan reports different tags from the previously recorded state. The appropriate design is to treat refresh and planning as comparisons between configuration, state and current provider observations. Confirm whether the team can distinguish observed drift from intentional configuration changes.
D:“The data lookup evaluates against the intended region and account” would address a different Terraform configuration concern; the source instead describes A remote-managed application is changed through an admin console, and the next Terraform plan reports different tags from the previously recorded state. The appropriate design is to treat refresh and planning as comparisons between configuration, state and current provider observations. Confirm whether the team can distinguish observed drift from intentional configuration changes.
Question 201
A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Map affected resources explicitly to the intended provider instance and verify their target endpoint.
- Use the complete intended provider source address and confirm the publisher namespace before initialization.
- Retain and review the lock file and perform explicit provider version upgrades with plan testing.
- Protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs.
Explanation
Correct Answer
D:The proposed intervention addresses the reported Terraform engineering failure: A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. It applies the design choice Protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Review the primary diagnostic: Inspect remote state storage access policies and encryption settings. The expected outcome is: Only authorized automation and reviewers can access encrypted state. The rollout safeguard is: Use a restricted encrypted backend and avoid committing state to Git.
Incorrect Answers
A:“Map affected resources explicitly to the intended provider instance and verify their target endpoint” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
B:“Use the complete intended provider source address and confirm the publisher namespace before initialization” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
C:“Retain and review the lock file and perform explicit provider version upgrades with plan testing” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
Question 202
A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. 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 remote state storage access policies and encryption settings.
- Check the local working directory's provider requirements and lock.
- Inspect terraform required_version alongside required_providers declarations.
- Review the state representation for credentials or sensitive computed attributes.
- Inspect required_providers addresses and provider block settings separately.
Explanation
Correct Answers
A:This is directly relevant evidence for the reported behavior: Inspect remote state storage access policies and encryption settings. 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: Protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. The expected confirmation is Only authorized automation and reviewers can access encrypted state.
D:This is directly relevant evidence for the reported behavior: Review the state representation for credentials or sensitive computed attributes. 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: Protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. The expected confirmation is Only authorized automation and reviewers can access encrypted state.
Incorrect Answers
B:“Check the local working directory's provider requirements and lock” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
C:“Inspect terraform required_version alongside required_providers declarations” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
E:“Inspect required_providers addresses and provider block settings separately” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
Question 203
A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- Mistaking initialization for provisioning can skip required change approvals.
- State can expose credentials and resource topology even if CLI output is redacted.
- Uncontrolled plugin upgrades can change planning behavior unexpectedly.
- Unexamined provider schema changes can lead to failed or destructive deployments.
Explanation
Correct Answer
B:The reported condition creates the specific potential exposure: State can expose credentials and resource topology even if CLI output is redacted. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Inspect remote state storage access policies and encryption settings. Second diagnostic: Review the state representation for credentials or sensitive computed attributes.
Incorrect Answers
A:“Mistaking initialization for provisioning can skip required change approvals” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
C:“Uncontrolled plugin upgrades can change planning behavior unexpectedly” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
D:“Unexamined provider schema changes can lead to failed or destructive deployments” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
Question 204
A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. A reviewer asks for BOTH a targeted technical response and a corresponding change-control safeguard. Which TWO actions together meet that requirement? (Select TWO.)
- Protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs.
- Use a restricted encrypted backend and avoid committing state to Git.
- Validate provider support and distinguish external automation needs.
- Restrict provider installation sources and verify checksums.
- Review a plan and apply the approved change because configuration edits do not call provider APIs on their own.
Explanation
Correct Answers
A:This is one of the two necessary decisions for a safe design: Protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Together the corrective action and its implementation safeguard need to address the recorded condition: A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. Acceptance requires Only authorized automation and reviewers can access encrypted state.
B:This is one of the two necessary decisions for a safe design: Use a restricted encrypted backend and avoid committing state to Git. Together the corrective action and its implementation safeguard need to address the recorded condition: A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. Acceptance requires Only authorized automation and reviewers can access encrypted state.
Incorrect Answers
C:“Validate provider support and distinguish external automation needs” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
D:“Restrict provider installation sources and verify checksums” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
E:“Review a plan and apply the approved change because configuration edits do not call provider APIs on their own” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
Question 205
A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. 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?
- Terraform runs authenticate using scoped identities with no secrets committed to code.
- Only authorized automation and reviewers can access encrypted state.
- The job installs only dependencies appropriate to the current project.
- The workspace is ready for planning without changing managed infrastructure.
Explanation
Correct Answer
B:This is the appropriate measurable post-change acceptance criterion: Only authorized automation and reviewers can access encrypted state. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Use a restricted encrypted backend and avoid committing state to Git.
Incorrect Answers
A:“Terraform runs authenticate using scoped identities with no secrets committed to code” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
C:“The job installs only dependencies appropriate to the current project” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
D:“The workspace is ready for planning without changing managed infrastructure” would address a different Terraform configuration concern; the source instead describes A junior engineer stores the terraform.tfstate file in a publicly readable object-storage bucket because the HCL files contain no secrets. The appropriate design is to protect state as sensitive infrastructure metadata regardless of sensitive flags on variables and outputs. Confirm whether only authorized automation and reviewers can access encrypted state.
Question 206
A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Use the complete intended provider source address and confirm the publisher namespace before initialization.
- Review a plan and apply the approved change because configuration edits do not call provider APIs on their own.
- Treat refresh and planning as comparisons between configuration, state and current provider observations.
- Declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs.
Explanation
Correct Answer
B:The proposed intervention addresses the reported Terraform engineering failure: A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. It applies the design choice Review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Review the primary diagnostic: Check the Git diff for the variable and dependent resource references. The expected outcome is: Approved configuration changes affect infrastructure only after the controlled apply. The rollout safeguard is: Keep plan and apply gates explicit in continuous delivery.
Incorrect Answers
A:“Use the complete intended provider source address and confirm the publisher namespace before initialization” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.
C:“Treat refresh and planning as comparisons between configuration, state and current provider observations” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.
D:“Declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.
Question 207
A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. Before choosing a remedy, the team needs independent evidence of the actual root cause. Which TWO checks most directly test this case? (Select TWO.)
- Check the state snapshot timestamp and managed resource identities.
- Inspect remote state storage access policies and encryption settings.
- Check the local working directory's provider requirements and lock.
- Check the Git diff for the variable and dependent resource references.
- Inspect the planned changes relative to current state and provider data.
Explanation
Correct Answers
D:This is directly relevant evidence for the reported behavior: Check the Git diff for the variable and dependent resource references. 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 a plan and apply the approved change because configuration edits do not call provider APIs on their own. The expected confirmation is Approved configuration changes affect infrastructure only after the controlled apply.
E:This is directly relevant evidence for the reported behavior: Inspect the planned changes relative to current state and provider data. 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 a plan and apply the approved change because configuration edits do not call provider APIs on their own. The expected confirmation is Approved configuration changes affect infrastructure only after the controlled apply.
Incorrect Answers
A:“Check the state snapshot timestamp and managed resource identities” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.
B:“Inspect remote state storage access policies and encryption settings” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.
C:“Check the local working directory's provider requirements and lock” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.
Question 208
A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- Duplicate local names can confuse provider address migration and resource targeting.
- Lost state mappings may lead to duplicate creates or mistaken replacement plans.
- Assuming code changes execute themselves may leave infrastructure out of sync.
- Implicit state sharing assumptions can produce references to the wrong resource.
Explanation
Correct Answer
C:The reported condition creates the specific potential exposure: Assuming code changes execute themselves may leave infrastructure out of sync. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Check the Git diff for the variable and dependent resource references. Second diagnostic: Inspect the planned changes relative to current state and provider data.
Incorrect Answers
A:“Duplicate local names can confuse provider address migration and resource targeting” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.
B:“Lost state mappings may lead to duplicate creates or mistaken replacement plans” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.
D:“Implicit state sharing assumptions can produce references to the wrong resource” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.
Question 209
A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. A reviewer asks for BOTH a targeted technical response and a corresponding change-control safeguard. Which TWO actions together meet that requirement? (Select TWO.)
- Review a plan and apply the approved change because configuration edits do not call provider APIs on their own.
- Use terraform providers lock for documented target platforms and review results.
- Keep approved mirrors and enforce dependency-lock checksum verification.
- Install a legitimate provider release under a reviewed version constraint instead of modifying cached provider binaries.
- Keep plan and apply gates explicit in continuous delivery.
Explanation
Correct Answers
A:This is one of the two necessary decisions for a safe design: Review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Together the corrective action and its implementation safeguard need to address the recorded condition: A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. Acceptance requires Approved configuration changes affect infrastructure only after the controlled apply.
E:This is one of the two necessary decisions for a safe design: Keep plan and apply gates explicit in continuous delivery. Together the corrective action and its implementation safeguard need to address the recorded condition: A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. Acceptance requires Approved configuration changes affect infrastructure only after the controlled apply.
Incorrect Answers
B:“Use terraform providers lock for documented target platforms and review results” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.
C:“Keep approved mirrors and enforce dependency-lock checksum verification” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.
D:“Install a legitimate provider release under a reviewed version constraint instead of modifying cached provider binaries” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.
Question 210
A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. 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?
- Both Terraform CLI and providers use independently reviewed compatible versions.
- The provider resolves to the right plugin and connects to the intended API endpoint.
- Terraform retains the correct association with the existing remote resource.
- Approved configuration changes affect infrastructure only after the controlled apply.
Explanation
Correct Answer
D:This is the appropriate measurable post-change acceptance criterion: Approved configuration changes affect infrastructure only after the controlled apply. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Keep plan and apply gates explicit in continuous delivery.
Incorrect Answers
A:“Both Terraform CLI and providers use independently reviewed compatible versions” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.
B:“The provider resolves to the right plugin and connects to the intended API endpoint” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.
C:“Terraform retains the correct association with the existing remote resource” would address a different Terraform configuration concern; the source instead describes A team believes updating a variable default automatically mutates the infrastructure without running any Terraform commands. The appropriate design is to review a plan and apply the approved change because configuration edits do not call provider APIs on their own. Confirm whether approved configuration changes affect infrastructure only after the controlled apply.