100% Latest & Updated HashiCorp Terraform Associate 004 Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 140
A Terraform platform team is coordinating 3 independent decisions. Workstream A: A finance system's VPC has been manually changed outside Terraform and a release manager wants a preview of reconciliation. and Workstream B: A short-lived token must be used during an operation, and auditors require that the token not be written to a plan file. and Workstream C: An operator leaves TF_LOG=TRACE enabled in production for all runs and sees excessive potentially sensitive logs. Select exactly 3 actions, one addressing each distinct workstream.
- Disable or lower TF_LOG after collecting the targeted diagnostic evidence.
- Run terraform plan with normal refresh behavior and inspect drift-driven proposed updates.
- Declare configuration_aliases in the child and pass the intended configurations through module.providers.
- Use an ephemeral input value in an allowed Terraform ephemeral context, such as a supported provider configuration.
- Specify the Git module source with the double-slash subdirectory syntax after the repository path.
- Pass a different root provider configuration into each module call through its providers map.
Explanation
Correct Answers
A:For the workstream in which an operator leaves TF_LOG=TRACE enabled in production for all runs and sees excessive potentially sensitive logs, use this action: Disable or lower TF_LOG after collecting the targeted diagnostic evidence. Logging scope and lifecycle must be controlled because verbose provider interaction details can reveal secrets. Verify: Subsequent normal runs no longer emit verbose tracing to the same log destination. Limitation: Disabling logs prevents future emission but does not erase previously collected sensitive log files.
B:For the workstream in which a finance system's VPC has been manually changed outside Terraform and a release manager wants a preview of reconciliation, use this action: Run terraform plan with normal refresh behavior and inspect drift-driven proposed updates. Planning refreshes known objects by default and proposes the actions needed for declared configuration. Verify: The plan compares refreshed remote objects and current state against desired configuration. Limitation: Plan is not a guarantee that nothing changes between its read and a later apply.
D:For the workstream in which a short-lived token must be used during an operation, and auditors require that the token not be written to a plan file, use this action: Use an ephemeral input value in an allowed Terraform ephemeral context, such as a supported provider configuration. Ephemeral variable semantics deliberately limit where transient values may flow. Verify: The ephemeral value is supplied for the operation but omitted from saved state and plan data. Limitation: Ephemeral values have context restrictions and cannot be inserted into arbitrary persistent expressions.
Incorrect Answers
C:This action is appropriate instead for a different, unlisted requirement: A child network module expects two AWS provider aliases, but the root module has only passed its default provider. It would be checked by: The child resource plans with the specifically mapped source and destination provider aliases. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
E:This action is appropriate instead for a different, unlisted requirement: A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. It would be checked by: Initialization loads only the intended child configuration rooted at the named subdirectory. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
F:This action is appropriate instead for a different, unlisted requirement: A security team calls the same reusable child module twice, once under each of two cloud accounts. It would be checked by: Each module instance is associated with the correct account provider during plan. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
Question 141
An infrastructure team faces this specific situation: A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. Which Terraform action most directly satisfies the requirement?
- Run terraform fmt -check for CI verification and terraform fmt to rewrite HCL formatting when authorized.
- Re-run terraform init and review module/provider resolution within existing constraints.
- Run terraform fmt -recursive on the intended directory tree after reviewing the file scope.
- Run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error.
Explanation
Correct Answer
D:Run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error. Detailed exit codes let automation distinguish successful plans with and without changes. Verify: CI captures and classifies the command exit code separately from console prose. Limitation: The exit-code classification describes planned changes, not their risk or policy approval.
Incorrect Answers
A:This is linked to a different situation: A pull request has inconsistent indentation and alignment, but the team does not want to provision any resources. There the relevant decision is: Run terraform fmt -check for CI verification and terraform fmt to rewrite HCL formatting when authorized. For the question's actual requirement — A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. — the specifically relevant decision is: Run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: A CI job already has provider plugins cached and wants to reinitialize a checkout safely after an ordinary module change. There the relevant decision is: Re-run terraform init and review module/provider resolution within existing constraints. For the question's actual requirement — A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. — the specifically relevant decision is: Run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A developer needs to format all Terraform files in nested module directories as part of a repository cleanup. There the relevant decision is: Run terraform fmt -recursive on the intended directory tree after reviewing the file scope. For the question's actual requirement — A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. — the specifically relevant decision is: Run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error. It would therefore not resolve or assess the case as stated.
Question 142
A reviewer is confirming a change for the following use case: A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. The implementation follows this approach: Run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error. Which observation or acceptance test most directly verifies the intended result?
- CI captures and classifies the command exit code separately from console prose.
- Validation reports schema errors without making changes to remote infrastructure.
- Terraform performs the saved proposed resource actions and updates state when successful.
- The formatting check succeeds on canonical HCL layout without cloud API changes.
Explanation
Correct Answer
A:Acceptance evidence: CI captures and classifies the command exit code separately from console prose. It validates the proposed action, run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error, because detailed exit codes let automation distinguish successful plans with and without changes. Remaining limitation: The exit-code classification describes planned changes, not their risk or policy approval.
Incorrect Answers
B:This is linked to a different situation: A commit is syntactically valid HCL but includes a resource argument not supported by the installed provider schema. There the relevant acceptance is: Validation reports schema errors without making changes to remote infrastructure. For the question's actual requirement — A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. — the specifically relevant acceptance is: CI captures and classifies the command exit code separately from console prose. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A signed-off infrastructure change has a saved plan artifact and the team needs to execute exactly that reviewed action set. There the relevant acceptance is: Terraform performs the saved proposed resource actions and updates state when successful. For the question's actual requirement — A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. — the specifically relevant acceptance is: CI captures and classifies the command exit code separately from console prose. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A pull request has inconsistent indentation and alignment, but the team does not want to provision any resources. There the relevant acceptance is: The formatting check succeeds on canonical HCL layout without cloud API changes. For the question's actual requirement — A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. — the specifically relevant acceptance is: CI captures and classifies the command exit code separately from console prose. It would therefore not resolve or assess the case as stated.
Question 143
Consider a proposed solution for this requirement: A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. The team plans to do the following: Run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error. Which limitation or operational caveat must remain in the review?
- The exit-code classification describes planned changes, not their risk or policy approval.
- Init does not create configured cloud infrastructure merely by installing plugins.
- Safe reinitialization may still expose provider-version conflicts or backend authentication errors.
- Some custom conditions depend on actual input or resource values and cannot all be exercised by validate alone.
Explanation
Correct Answer
A:The limitation is the exit-code classification describes planned changes, not their risk or policy approval. The proposed change is run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error. Validate it by checking cI captures and classifies the command exit code separately from console prose. Detailed exit codes let automation distinguish successful plans with and without changes.
Incorrect Answers
B:This is linked to a different situation: An engineer clones a Terraform repository and sees an error that provider plugins are not installed. There the relevant limitation is: Init does not create configured cloud infrastructure merely by installing plugins. For the question's actual requirement — A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. — the specifically relevant limitation is: The exit-code classification describes planned changes, not their risk or policy approval. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A CI job already has provider plugins cached and wants to reinitialize a checkout safely after an ordinary module change. There the relevant limitation is: Safe reinitialization may still expose provider-version conflicts or backend authentication errors. For the question's actual requirement — A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. — the specifically relevant limitation is: The exit-code classification describes planned changes, not their risk or policy approval. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A root module contains a new variable validation rule, and an engineer wants to check the HCL before accessing cloud credentials. There the relevant limitation is: Some custom conditions depend on actual input or resource values and cannot all be exercised by validate alone. For the question's actual requirement — A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. — the specifically relevant limitation is: The exit-code classification describes planned changes, not their risk or policy approval. It would therefore not resolve or assess the case as stated.
Question 144
The team is reviewing a Terraform implementation for this case: A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. Which tempting assumption would be specifically incorrect for this proposed implementation?
- Run terraform apply to standardize whitespace in .tf files.
- Assume exit code 2 indicates a Terraform command failure.
- Run terraform apply against an uninitialized directory and assume plugins are installed automatically at runtime.
- Assume terraform destroy deletes every resource in the cloud subscription regardless of state ownership.
Explanation
Correct Answer
B:Reject the assumption: Assume exit code 2 indicates a Terraform command failure. Instead, run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error. Detailed exit codes let automation distinguish successful plans with and without changes. Acceptance evidence: CI captures and classifies the command exit code separately from console prose.
Incorrect Answers
A:This is linked to a different situation: A pull request has inconsistent indentation and alignment, but the team does not want to provision any resources. There the relevant misconception is: Run terraform apply to standardize whitespace in .tf files. For the question's actual requirement — A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. — the specifically relevant misconception is: Assume exit code 2 indicates a Terraform command failure. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. There the relevant misconception is: Run terraform apply against an uninitialized directory and assume plugins are installed automatically at runtime. For the question's actual requirement — A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. — the specifically relevant misconception is: Assume exit code 2 indicates a Terraform command failure. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. There the relevant misconception is: Assume terraform destroy deletes every resource in the cloud subscription regardless of state ownership. For the question's actual requirement — A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. — the specifically relevant misconception is: Assume exit code 2 indicates a Terraform command failure. It would therefore not resolve or assess the case as stated.
Question 145
A Terraform platform team is coordinating 2 independent decisions. Workstream A: A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. and Workstream B: A company rotates application credentials in Vault and wants Terraform pipelines to avoid checking decrypted secrets into source control. Select exactly 2 actions, one addressing each distinct workstream.
- Specify a reviewed registry-module version constraint in the module block.
- Run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error.
- Assign appropriate HCP Terraform team permissions at the workspace or project level for read versus apply actions.
- Read or pass credentials with an approved Vault integration and secure runtime identity, applying ephemeral/write-only protections where supported.
- Configure an appropriate supported remote backend with secure access and locking rather than emailing terraform.tfstate.
Explanation
Correct Answers
B:For the workstream in which a compliance team wants to distinguish an empty Terraform plan from one with material changes in automation, use this action: Run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error. Detailed exit codes let automation distinguish successful plans with and without changes. Verify: CI captures and classifies the command exit code separately from console prose. Limitation: The exit-code classification describes planned changes, not their risk or policy approval.
D:For the workstream in which a company rotates application credentials in Vault and wants Terraform pipelines to avoid checking decrypted secrets into source control, use this action: Read or pass credentials with an approved Vault integration and secure runtime identity, applying ephemeral/write-only protections where supported. Vault centralizes secret management, but Terraform's state-persistence semantics must still be handled explicitly. Verify: Version-controlled HCL contains no hardcoded cleartext credential and the approved secret path is resolvable at runtime. Limitation: A conventional Vault data source may still write returned secrets into state unless a safe mechanism is chosen.
Incorrect Answers
A:This option addresses a separate requirement: A team uses a module from the public registry and needs to prevent unreviewed minor changes after a security assessment. Evidence for that other requirement would be initialization selects a module release satisfying the stated registry version requirement; neither listed workstream asks for it.
C:This option addresses a separate requirement: A compliance team needs centralized access control so reviewers can view runs but only deployers can approve infrastructure changes. Evidence for that other requirement would be reviewers can inspect plans and run history while only authorized teams can approve applies; neither listed workstream asks for it.
E:This option addresses a separate requirement: A team's state file is stored on a laptop and must be shared across several engineers without copying it manually after every change. Evidence for that other requirement would be multiple team members read one central state snapshot and serialized operations when the backend supports locking; neither listed workstream asks for it.
Question 146
An infrastructure team faces this specific situation: A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. Which Terraform action most directly satisfies the requirement?
- Re-run terraform init and review module/provider resolution within existing constraints.
- Save the reviewed plan with terraform plan -out=release.tfplan and apply that saved plan file.
- Run terraform fmt -recursive on the intended directory tree after reviewing the file scope.
- Inspect terraform plan -replace=ADDRESS and review any downstream dependencies before applying.
Explanation
Correct Answer
D:Inspect terraform plan -replace=ADDRESS and review any downstream dependencies before applying. The -replace option makes a targeted replacement intent explicit in the plan. Verify: The proposed plan marks that particular resource instance for replacement. Limitation: Replacement may cause disruption and require associated dependent changes; it is not a read-only fix.
Incorrect Answers
A:This is linked to a different situation: A CI job already has provider plugins cached and wants to reinitialize a checkout safely after an ordinary module change. There the relevant decision is: Re-run terraform init and review module/provider resolution within existing constraints. For the question's actual requirement — A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. — the specifically relevant decision is: Inspect terraform plan -replace=ADDRESS and review any downstream dependencies before applying. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. There the relevant decision is: Save the reviewed plan with terraform plan -out=release.tfplan and apply that saved plan file. For the question's actual requirement — A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. — the specifically relevant decision is: Inspect terraform plan -replace=ADDRESS and review any downstream dependencies before applying. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A developer needs to format all Terraform files in nested module directories as part of a repository cleanup. There the relevant decision is: Run terraform fmt -recursive on the intended directory tree after reviewing the file scope. For the question's actual requirement — A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. — the specifically relevant decision is: Inspect terraform plan -replace=ADDRESS and review any downstream dependencies before applying. It would therefore not resolve or assess the case as stated.
Question 147
A reviewer is confirming a change for the following use case: A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. The implementation follows this approach: Inspect terraform plan -replace=ADDRESS and review any downstream dependencies before applying. Which observation or acceptance test most directly verifies the intended result?
- The command rewrites formatting of Terraform configuration files in nested directories.
- The output enumerates expected managed-object deletions and remains speculative.
- Static validation succeeds and an invalid supplied input is rejected at the stage where its custom condition is evaluated.
- The proposed plan marks that particular resource instance for replacement.
Explanation
Correct Answer
D:Acceptance evidence: The proposed plan marks that particular resource instance for replacement. It validates the proposed action, inspect terraform plan -replace=ADDRESS and review any downstream dependencies before applying, because the -replace option makes a targeted replacement intent explicit in the plan. Remaining limitation: Replacement may cause disruption and require associated dependent changes; it is not a read-only fix.
Incorrect Answers
A:This is linked to a different situation: A developer needs to format all Terraform files in nested module directories as part of a repository cleanup. There the relevant acceptance is: The command rewrites formatting of Terraform configuration files in nested directories. For the question's actual requirement — A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. — the specifically relevant acceptance is: The proposed plan marks that particular resource instance for replacement. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. There the relevant acceptance is: The output enumerates expected managed-object deletions and remains speculative. For the question's actual requirement — A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. — the specifically relevant acceptance is: The proposed plan marks that particular resource instance for replacement. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A root module contains a new variable validation rule, and an engineer wants to check the HCL before accessing cloud credentials. There the relevant acceptance is: Static validation succeeds and an invalid supplied input is rejected at the stage where its custom condition is evaluated. For the question's actual requirement — A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. — the specifically relevant acceptance is: The proposed plan marks that particular resource instance for replacement. It would therefore not resolve or assess the case as stated.
Question 148
Consider a proposed solution for this requirement: A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. The team plans to do the following: Inspect terraform plan -replace=ADDRESS and review any downstream dependencies before applying. Which limitation or operational caveat must remain in the review?
- Replacement may cause disruption and require associated dependent changes; it is not a read-only fix.
- Style changes should be reviewed and committed; formatting does not upgrade modules.
- Some custom conditions depend on actual input or resource values and cannot all be exercised by validate alone.
- An input variable's unknown runtime value may prevent validation from deciding every plan-time expression.
Explanation
Correct Answer
A:The limitation is replacement may cause disruption and require associated dependent changes; it is not a read-only fix. The proposed change is inspect terraform plan -replace=ADDRESS and review any downstream dependencies before applying. Validate it by checking the proposed plan marks that particular resource instance for replacement. The -replace option makes a targeted replacement intent explicit in the plan.
Incorrect Answers
B:This is linked to a different situation: A developer needs to format all Terraform files in nested module directories as part of a repository cleanup. There the relevant limitation is: Style changes should be reviewed and committed; formatting does not upgrade modules. For the question's actual requirement — A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. — the specifically relevant limitation is: Replacement may cause disruption and require associated dependent changes; it is not a read-only fix. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A root module contains a new variable validation rule, and an engineer wants to check the HCL before accessing cloud credentials. There the relevant limitation is: Some custom conditions depend on actual input or resource values and cannot all be exercised by validate alone. For the question's actual requirement — A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. — the specifically relevant limitation is: Replacement may cause disruption and require associated dependent changes; it is not a read-only fix. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A commit is syntactically valid HCL but includes a resource argument not supported by the installed provider schema. There the relevant limitation is: An input variable's unknown runtime value may prevent validation from deciding every plan-time expression. For the question's actual requirement — A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. — the specifically relevant limitation is: Replacement may cause disruption and require associated dependent changes; it is not a read-only fix. It would therefore not resolve or assess the case as stated.
Question 149
The team is reviewing a Terraform implementation for this case: A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. Which tempting assumption would be specifically incorrect for this proposed implementation?
- Use terraform apply -auto-approve for a read-only drift-reporting job.
- Use terraform init -reconfigure while expecting it to copy the old state automatically.
- Re-run an unreviewed terraform apply without a saved plan after the approval window.
- Remove all state bindings to induce a replacement without reviewing the resulting plan.
Explanation
Correct Answer
D:Reject the assumption: Remove all state bindings to induce a replacement without reviewing the resulting plan. Instead, inspect terraform plan -replace=ADDRESS and review any downstream dependencies before applying. The -replace option makes a targeted replacement intent explicit in the plan. Acceptance evidence: The proposed plan marks that particular resource instance for replacement.
Incorrect Answers
A:This is linked to a different situation: A nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. There the relevant misconception is: Use terraform apply -auto-approve for a read-only drift-reporting job. For the question's actual requirement — A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. — the specifically relevant misconception is: Remove all state bindings to induce a replacement without reviewing the resulting plan. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: A backend location was changed in configuration, but Terraform still recognizes the prior backend and asks how to proceed. There the relevant misconception is: Use terraform init -reconfigure while expecting it to copy the old state automatically. For the question's actual requirement — A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. — the specifically relevant misconception is: Remove all state bindings to induce a replacement without reviewing the resulting plan. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. There the relevant misconception is: Re-run an unreviewed terraform apply without a saved plan after the approval window. For the question's actual requirement — A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. — the specifically relevant misconception is: Remove all state bindings to induce a replacement without reviewing the resulting plan. It would therefore not resolve or assess the case as stated.
Question 150
A Terraform platform team is coordinating 3 independent decisions. Workstream A: A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. and Workstream B: A shared platform module is stored in the Terraform public registry and teams need to invoke it without copying the repository contents. and Workstream C: A development team connects one infrastructure repository to an HCP Terraform workspace and expects reviewed commits to trigger plans. Select exactly 3 actions, one addressing each distinct workstream.
- Select the appropriate HCP Terraform cloud integration and remove the conflicting backend declaration.
- Use an object type constraint within a map or list collection with named attribute types.
- Use a module block whose source specifies the documented Terraform Registry namespace, name, and provider.
- Configure the workspace's VCS connection, working directory, and run triggers for the intended branch.
- Inspect terraform plan -replace=ADDRESS and review any downstream dependencies before applying.
- Declare a managed resource for the new load balancer and an appropriate data source for the existing network lookup.
Explanation
Correct Answers
C:For the workstream in which a shared platform module is stored in the Terraform public registry and teams need to invoke it without copying the repository contents, use this action: Use a module block whose source specifies the documented Terraform Registry namespace, name, and provider. Module source tells Terraform where to obtain reusable child configuration. Verify: terraform init downloads the appropriate registry module and the child resources appear in the plan. Limitation: Module source selection does not configure credentials or automatically choose a safe release version.
D:For the workstream in which a development team connects one infrastructure repository to an HCP Terraform workspace and expects reviewed commits to trigger plans, use this action: Configure the workspace's VCS connection, working directory, and run triggers for the intended branch. VCS-driven workflows integrate versioned configuration with workspace execution triggers. Verify: A relevant commit produces a workspace run and pull requests can show speculative plans if configured. Limitation: In a monorepo, trigger paths should prevent unrelated folder changes from creating unnecessary runs.
E:For the workstream in which a deployment operator needs to replace a single degraded instance deliberately while keeping its resource address, use this action: Inspect terraform plan -replace=ADDRESS and review any downstream dependencies before applying. The -replace option makes a targeted replacement intent explicit in the plan. Verify: The proposed plan marks that particular resource instance for replacement. Limitation: Replacement may cause disruption and require associated dependent changes; it is not a read-only fix.
Incorrect Answers
A:This action is appropriate instead for a different, unlisted requirement: A Terraform configuration contains both a cloud block and a backend block while planning to use HCP Terraform remote execution. It would be checked by: Initialization uses the configured HCP organization and workspace association without a second backend block. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
B:This action is appropriate instead for a different, unlisted requirement: A developer defines a subnet inventory in which every subnet has cidr, zone, and public attributes, and needs reliable shape checking. It would be checked by: Invalid records with wrong attribute types fail validation rather than causing obscure downstream errors. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
F:This action is appropriate instead for a different, unlisted requirement: A web team must create a new load balancer and also look up an existing shared network ID managed by another team. It would be checked by: Plan distinguishes a create action from a read-only query of the existing network. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
HashiCorp Certified: Terraform Associate (004) (Terraform Associate 004) Practice Tests