HashiCorp Terraform Associate 004 Exam Dumps, Practice Test Questions

100% Latest & Updated HashiCorp Terraform Associate 004 Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!

HashiCorp Terraform Associate 004 Premium Bundle
$64.98
$54.98

Terraform Associate 004 Premium Bundle

  • Premium File: 167 Questions & Answers. Last update: Nov 9, 2026
  • Study Guide: 285 Pages
  • Latest Questions
  • 100% Accurate Answers
  • Fast Exam Updates

Terraform Associate 004 Premium Bundle

HashiCorp Terraform Associate 004 Premium Bundle
  • Premium File: 167 Questions & Answers. Last update: Nov 9, 2026
  • Study Guide: 285 Pages
  • Latest Questions
  • 100% Accurate Answers
  • Fast Exam Updates
$64.98
$54.98

HashiCorp Terraform Associate 004 Practice Test 11

Question 100

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. and Workstream B: A team's database must never be accidentally destroyed by a routine Terraform plan while its resource declaration remains managed. and Workstream C: A database already exists outside Terraform but needs to become managed under an explicit new resource address. Select exactly 3 actions, one addressing each distinct workstream.

  1. Declare configuration_aliases in the child and pass the intended configurations through module.providers.
  2. Initialize the working directory, inspect a plan, and only then perform an authorized apply.
  3. Write a matching resource declaration and use an import block or terraform import with the real object identifier.
  4. Configure a valid cloud block for the organization/workspace and authenticate with terraform login.
  5. Set lifecycle prevent_destroy and verify the protection is exercised by a proposed destructive plan.
  6. Declare separate supported Kubernetes and DNS providers and use their respective resource types in the same root module.

Explanation

Correct Answers

B:

For the workstream in which a newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend, use this action: Initialize the working directory, inspect a plan, and only then perform an authorized apply. The standard write-init-plan-apply workflow separates preparation, preview, and execution. Verify: The initialization succeeds and the reviewed plan enumerates proposed actions before change execution. Limitation: Commands may still fail on missing credentials, invalid cloud quotas, or forbidden API actions.

C:

For the workstream in which a database already exists outside Terraform but needs to become managed under an explicit new resource address, use this action: Write a matching resource declaration and use an import block or terraform import with the real object identifier. Import binds an existing remote object to a Terraform resource address. Verify: State gains the intended address and a reviewed plan evaluates remaining configuration differences. Limitation: Import establishes identity and may not generate all required configuration fields automatically.

E:

For the workstream in which a team's database must never be accidentally destroyed by a routine Terraform plan while its resource declaration remains managed, use this action: Set lifecycle prevent_destroy and verify the protection is exercised by a proposed destructive plan. prevent_destroy rejects destructive plans while its rule is present in managed configuration. Verify: A plan that would destroy the configured protected resource is rejected with an error. Limitation: Removing the entire resource block also removes this configuration-based guard; it is not permanent cloud-side deletion protection.

Incorrect Answers

A:

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.

D:

This action is appropriate instead for a different, unlisted requirement: A workstation has Terraform CLI installed but a team wants the local CLI to invoke HCP Terraform remote runs and manage state. It would be checked by: The CLI connects to the HCP workspace and follows its selected remote execution and state workflow. 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 newly created project uses both a Kubernetes cluster and cloud DNS records, and the same release should manage them coherently. It would be checked by: The plan shows objects from both provider schemas and does not misroute requests across APIs. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

Question 101

An infrastructure team faces this specific situation: A nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. Which Terraform action most directly satisfies the requirement?

  1. Run terraform fmt -check for CI verification and terraform fmt to rewrite HCL formatting when authorized.
  2. Run a speculative terraform plan with the desired inputs and examine its proposed changes.
  3. Run terraform fmt -recursive on the intended directory tree after reviewing the file scope.
  4. Run terraform apply release.tfplan under authorized credentials and the correct backend.

Explanation

Correct Answer

B:

Run a speculative terraform plan with the desired inputs and examine its proposed changes. Plan previews reconciliation; apply would perform changes. Verify: The command returns a plan showing resource actions without executing them. Limitation: A speculative plan can become stale and must not be mistaken for an approval to apply.

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 nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. — the specifically relevant decision is: Run a speculative terraform plan with the desired inputs and examine its proposed changes. 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 nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. — the specifically relevant decision is: Run a speculative terraform plan with the desired inputs and examine its proposed changes. It would therefore not resolve or assess the case as stated.

D:

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 decision is: Run terraform apply release.tfplan under authorized credentials and the correct backend. For the question's actual requirement — A nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. — the specifically relevant decision is: Run a speculative terraform plan with the desired inputs and examine its proposed changes. It would therefore not resolve or assess the case as stated.

Question 102

A reviewer is confirming a change for the following use case: A nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. The implementation follows this approach: Run a speculative terraform plan with the desired inputs and examine its proposed changes. Which observation or acceptance test most directly verifies the intended result?

  1. The .terraform working data and dependency lock file reflect successful initialization.
  2. The output enumerates expected managed-object deletions and remains speculative.
  3. The command returns a plan showing resource actions without executing them.
  4. CI captures and classifies the command exit code separately from console prose.

Explanation

Correct Answer

C:

Acceptance evidence: The command returns a plan showing resource actions without executing them. It validates the proposed action, run a speculative terraform plan with the desired inputs and examine its proposed changes, because plan previews reconciliation; apply would perform changes. Remaining limitation: A speculative plan can become stale and must not be mistaken for an approval to apply.

Incorrect Answers

A:

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 acceptance is: The .terraform working data and dependency lock file reflect successful initialization. For the question's actual requirement — A nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. — the specifically relevant acceptance is: The command returns a plan showing resource actions without executing them. 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 nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. — the specifically relevant acceptance is: The command returns a plan showing resource actions without executing them. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. There the relevant acceptance is: CI captures and classifies the command exit code separately from console prose. For the question's actual requirement — A nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. — the specifically relevant acceptance is: The command returns a plan showing resource actions without executing them. It would therefore not resolve or assess the case as stated.

Question 103

Consider a proposed solution for this requirement: A nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. The team plans to do the following: Run a speculative terraform plan with the desired inputs and examine its proposed changes. Which limitation or operational caveat must remain in the review?

  1. Sensitive plan files require protection; a changed state can invalidate an old plan.
  2. Replacement may cause disruption and require associated dependent changes; it is not a read-only fix.
  3. An input variable's unknown runtime value may prevent validation from deciding every plan-time expression.
  4. A speculative plan can become stale and must not be mistaken for an approval to apply.

Explanation

Correct Answer

D:

The limitation is a speculative plan can become stale and must not be mistaken for an approval to apply. The proposed change is run a speculative terraform plan with the desired inputs and examine its proposed changes. Validate it by checking the command returns a plan showing resource actions without executing them. Plan previews reconciliation; apply would perform changes.

Incorrect Answers

A:

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 limitation is: Sensitive plan files require protection; a changed state can invalidate an old plan. For the question's actual requirement — A nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. — the specifically relevant limitation is: A speculative plan can become stale and must not be mistaken for an approval to apply. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. There the relevant limitation is: Replacement may cause disruption and require associated dependent changes; it is not a read-only fix. For the question's actual requirement — A nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. — the specifically relevant limitation is: A speculative plan can become stale and must not be mistaken for an approval to apply. It would therefore not resolve or assess the case as stated.

C:

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 nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. — the specifically relevant limitation is: A speculative plan can become stale and must not be mistaken for an approval to apply. It would therefore not resolve or assess the case as stated.

Question 104

The team is reviewing a Terraform implementation for this case: A nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Assume a whitespace formatter verifies every plugin-specific argument.
  2. Assume exit code 2 indicates a Terraform command failure.
  3. Use terraform apply -auto-approve for a read-only drift-reporting job.
  4. Use terraform init -reconfigure while expecting it to copy the old state automatically.

Explanation

Correct Answer

C:

Reject the assumption: Use terraform apply -auto-approve for a read-only drift-reporting job. Instead, run a speculative terraform plan with the desired inputs and examine its proposed changes. Plan previews reconciliation; apply would perform changes. Acceptance evidence: The command returns a plan showing resource actions without executing them.

Incorrect Answers

A:

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 misconception is: Assume a whitespace formatter verifies every plugin-specific argument. For the question's actual requirement — A nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. — the specifically relevant misconception is: Use terraform apply -auto-approve for a read-only drift-reporting job. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. There the relevant misconception is: Assume exit code 2 indicates a Terraform command failure. For the question's actual requirement — A nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. — the specifically relevant misconception is: Use terraform apply -auto-approve for a read-only drift-reporting job. It would therefore not resolve or assess the case as stated.

D:

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 nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. — the specifically relevant misconception is: Use terraform apply -auto-approve for a read-only drift-reporting job. It would therefore not resolve or assess the case as stated.

Question 105

A Terraform platform team is coordinating 2 independent decisions. Workstream A: A nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. and Workstream B: A managed resource's tag is updated by an external compliance agent, and Terraform must not revert only that tag on every plan. Select exactly 2 actions, one addressing each distinct workstream.

  1. Run a speculative terraform plan with the desired inputs and examine its proposed changes.
  2. Use lifecycle ignore_changes for the specifically shared tag attribute after agreeing which system owns it.
  3. Keep one authoritative managed address per remote object and refactor references accordingly.
  4. Configure the workspace's VCS connection, working directory, and run triggers for the intended branch.
  5. Create a child module with declared input variables, resource blocks, and output values, then invoke it from a root module.

Explanation

Correct Answers

A:

For the workstream in which a nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources, use this action: Run a speculative terraform plan with the desired inputs and examine its proposed changes. Plan previews reconciliation; apply would perform changes. Verify: The command returns a plan showing resource actions without executing them. Limitation: A speculative plan can become stale and must not be mistaken for an approval to apply.

B:

For the workstream in which a managed resource's tag is updated by an external compliance agent, and Terraform must not revert only that tag on every plan, use this action: Use lifecycle ignore_changes for the specifically shared tag attribute after agreeing which system owns it. ignore_changes narrows drift reconciliation for selected attributes during updates. Verify: Subsequent plans avoid proposing updates solely because the ignored tag changed outside Terraform. Limitation: Ignore rules do not ignore the attribute at initial resource creation and can hide meaningful drift if used too broadly.

Incorrect Answers

C:

This option addresses a separate requirement: An engineer is importing one cloud instance but attempts to assign the same remote object to two Terraform resource addresses. Evidence for that other requirement would be state inspection shows the imported instance at a single intended address; neither listed workstream asks for it.

D:

This option addresses a separate requirement: A development team connects one infrastructure repository to an HCP Terraform workspace and expects reviewed commits to trigger plans. Evidence for that other requirement would be a relevant commit produces a workspace run and pull requests can show speculative plans if configured; neither listed workstream asks for it.

E:

This option addresses a separate requirement: A team is packaging a repeated VPC pattern and wants a stable interface for internal consumers. Evidence for that other requirement would be consumers can pass environment-specific inputs and receive selected outputs without editing child internals; neither listed workstream asks for it.

Question 106

An infrastructure team faces this specific situation: A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. Which Terraform action most directly satisfies the requirement?

  1. Run terraform plan -destroy to inspect the destruction actions without applying them.
  2. Run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error.
  3. Save the reviewed plan with terraform plan -out=release.tfplan and apply that saved plan file.
  4. Run terraform fmt -recursive on the intended directory tree after reviewing the file scope.

Explanation

Correct Answer

C:

Save the reviewed plan with terraform plan -out=release.tfplan and apply that saved plan file. A saved plan ties later execution to what was actually reviewed. Verify: The apply consumes the named plan artifact and uses its previously selected actions and variable values. Limitation: Saved plans may contain sensitive data and can be rejected if the underlying state changed.

Incorrect Answers

A:

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 decision is: Run terraform plan -destroy to inspect the destruction actions without applying them. For the question's actual requirement — A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. — the specifically relevant decision is: Save the reviewed plan with terraform plan -out=release.tfplan and apply that saved plan file. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. There the relevant decision is: Run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error. For the question's actual requirement — A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. — the specifically relevant decision is: Save the reviewed plan with terraform plan -out=release.tfplan and apply that saved plan file. It would therefore not resolve or assess the case as stated.

D:

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 release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. — the specifically relevant decision is: Save the reviewed plan with terraform plan -out=release.tfplan and apply that saved plan file. It would therefore not resolve or assess the case as stated.

Question 107

A reviewer is confirming a change for the following use case: A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. The implementation follows this approach: Save the reviewed plan with terraform plan -out=release.tfplan and apply that saved plan file. Which observation or acceptance test most directly verifies the intended result?

  1. The command rewrites formatting of Terraform configuration files in nested directories.
  2. The apply consumes the named plan artifact and uses its previously selected actions and variable values.
  3. The validate command reports whether the configuration passes Terraform's static checks.
  4. The plan compares refreshed remote objects and current state against desired configuration.

Explanation

Correct Answer

B:

Acceptance evidence: The apply consumes the named plan artifact and uses its previously selected actions and variable values. It validates the proposed action, save the reviewed plan with terraform plan -out=release.tfplan and apply that saved plan file, because a saved plan ties later execution to what was actually reviewed. Remaining limitation: Saved plans may contain sensitive data and can be rejected if the underlying state changed.

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 release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. — the specifically relevant acceptance is: The apply consumes the named plan artifact and uses its previously selected actions and variable values. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A developer adds a missing required argument to a resource definition and needs a fast validation before planning. There the relevant acceptance is: The validate command reports whether the configuration passes Terraform's static checks. For the question's actual requirement — A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. — the specifically relevant acceptance is: The apply consumes the named plan artifact and uses its previously selected actions and variable values. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A finance system's VPC has been manually changed outside Terraform and a release manager wants a preview of reconciliation. There the relevant acceptance is: The plan compares refreshed remote objects and current state against desired configuration. For the question's actual requirement — A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. — the specifically relevant acceptance is: The apply consumes the named plan artifact and uses its previously selected actions and variable values. It would therefore not resolve or assess the case as stated.

Question 108

Consider a proposed solution for this requirement: A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. The team plans to do the following: Save the reviewed plan with terraform plan -out=release.tfplan and apply that saved plan file. Which limitation or operational caveat must remain in the review?

  1. Provider dependencies and shared infrastructure still require a risk review before deletion.
  2. The exit-code classification describes planned changes, not their risk or policy approval.
  3. Some custom conditions depend on actual input or resource values and cannot all be exercised by validate alone.
  4. Saved plans may contain sensitive data and can be rejected if the underlying state changed.

Explanation

Correct Answer

D:

The limitation is saved plans may contain sensitive data and can be rejected if the underlying state changed. The proposed change is save the reviewed plan with terraform plan -out=release.tfplan and apply that saved plan file. Validate it by checking the apply consumes the named plan artifact and uses its previously selected actions and variable values. A saved plan ties later execution to what was actually reviewed.

Incorrect Answers

A:

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 limitation is: Provider dependencies and shared infrastructure still require a risk review before deletion. For the question's actual requirement — A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. — the specifically relevant limitation is: Saved plans may contain sensitive data and can be rejected if the underlying state changed. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. There the relevant limitation is: The exit-code classification describes planned changes, not their risk or policy approval. For the question's actual requirement — A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. — the specifically relevant limitation is: Saved plans may contain sensitive data and can be rejected if the underlying state changed. 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 release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. — the specifically relevant limitation is: Saved plans may contain sensitive data and can be rejected if the underlying state changed. It would therefore not resolve or assess the case as stated.

Question 109

The team is reviewing a Terraform implementation for this case: A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Re-run an unreviewed terraform apply without a saved plan after the approval window.
  2. Treat a successful syntax validation as proof that every possible runtime input satisfies its validation.
  3. Run terraform fmt expecting it to download providers and configure the backend.
  4. Assume terraform destroy deletes every resource in the cloud subscription regardless of state ownership.

Explanation

Correct Answer

A:

Reject the assumption: Re-run an unreviewed terraform apply without a saved plan after the approval window. Instead, save the reviewed plan with terraform plan -out=release.tfplan and apply that saved plan file. A saved plan ties later execution to what was actually reviewed. Acceptance evidence: The apply consumes the named plan artifact and uses its previously selected actions and variable values.

Incorrect Answers

B:

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 misconception is: Treat a successful syntax validation as proof that every possible runtime input satisfies its validation. For the question's actual requirement — A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. — the specifically relevant misconception is: Re-run an unreviewed terraform apply without a saved plan after the approval window. It would therefore not resolve or assess the case as stated.

C:

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 misconception is: Run terraform fmt expecting it to download providers and configure the backend. For the question's actual requirement — A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. — the specifically relevant misconception is: Re-run an unreviewed terraform apply without a saved plan after the approval window. 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 release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. — the specifically relevant misconception is: Re-run an unreviewed terraform apply without a saved plan after the approval window. It would therefore not resolve or assess the case as stated.

Question 110

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval. and Workstream B: A reusable module needs to reject a user-provided CIDR that is outside a documented allowed address family. and Workstream C: A new import block is committed for a resource whose configuration is incomplete and the team wants a review before apply. Select exactly 3 actions, one addressing each distinct workstream.

  1. Choose an explicit Git ref in the source URL rather than the registry-specific module version argument.
  2. Describe the desired networks and dependencies in versioned Terraform configuration and review plans before applying.
  3. Generate and review a plan for the import block, optionally using supported configuration generation where appropriate.
  4. Save the reviewed plan with terraform plan -out=release.tfplan and apply that saved plan file.
  5. Configure separate HCP workspaces with correct working directories and path-based VCS run triggers.
  6. Add a variable validation block with a clear condition and error message appropriate for the supported expression.

Explanation

Correct Answers

C:

For the workstream in which a new import block is committed for a resource whose configuration is incomplete and the team wants a review before apply, use this action: Generate and review a plan for the import block, optionally using supported configuration generation where appropriate. Declarative imports let adoption be planned and reviewed within the normal Terraform lifecycle. Verify: The plan shows import actions and any additional changes needed to align desired configuration. Limitation: Generated configuration still requires technical review and may include values unsuitable for production.

D:

For the workstream in which a release pipeline needs to ensure the exact reviewed plan, not a newly calculated one, is executed after approval, use this action: Save the reviewed plan with terraform plan -out=release.tfplan and apply that saved plan file. A saved plan ties later execution to what was actually reviewed. Verify: The apply consumes the named plan artifact and uses its previously selected actions and variable values. Limitation: Saved plans may contain sensitive data and can be rejected if the underlying state changed.

F:

For the workstream in which a reusable module needs to reject a user-provided CIDR that is outside a documented allowed address family, use this action: Add a variable validation block with a clear condition and error message appropriate for the supported expression. Variable conditions verify value requirements beyond primitive type checking. Verify: Planning with an invalid input produces a useful validation error before unwanted resource operations. Limitation: Custom validation must reflect the true policy; a syntactically valid condition may be overly broad or restrictive.

Incorrect Answers

A:

This action is appropriate instead for a different, unlisted requirement: A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. It would be checked by: Terraform downloads the module code at the intended Git tag or commit during init. 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 university repeats a six-network, three-environment build by copying screenshots of console clicks, and auditors cannot reconstruct which settings produced the last deployment. It would be checked by: A fresh environment can be planned from the same versioned configuration and its intended change set reviewed. 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 company uses one VCS monorepo for several independent Terraform root directories and wants each to run only when relevant files change. It would be checked by: Changing one directory triggers its intended workspace without spurious unrelated runs. 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

UP

SPECIAL OFFER: GET 10% OFF

This is ONE TIME OFFER

ExamSnap Discount Offer
Enter Your Email Address to Receive Your 10% Off Discount Code

A confirmation link will be sent to this email address to verify your login. *We value your privacy. We will not rent or sell your email address.

Download Free Demo of VCE Exam Simulator

Experience Avanset VCE Exam Simulator for yourself.

Simply submit your e-mail address below to get started with our interactive software demo of your free trial.

Free Demo Limits: In the demo version you will be able to access only first 5 questions from exam.