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 17

Question 160

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A developer executes terraform apply interactively without a plan file and sees a proposed change summary. and Workstream B: An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. and Workstream C: A workstation has Terraform CLI installed but a team wants the local CLI to invoke HCP Terraform remote runs and manage state. Select exactly 3 actions, one addressing each distinct workstream.

  1. Review the generated plan and approve the apply prompt only if the changes are intended.
  2. Declare one backend block inside terraform and reinitialize the working directory.
  3. Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials.
  4. Set an appropriate TF_LOG level for the troubleshooting session and reproduce the error safely.
  5. Declare configuration_aliases in the child and pass the intended configurations through module.providers.
  6. Configure a valid cloud block for the organization/workspace and authenticate with terraform login.

Explanation

Correct Answers

A:

For the workstream in which a developer executes terraform apply interactively without a plan file and sees a proposed change summary, use this action: Review the generated plan and approve the apply prompt only if the changes are intended. Without a saved plan, apply usually calculates and presents a plan for explicit approval. Verify: The apply command waits for confirmation before changing resources in normal interactive use. Limitation: Noninteractive auto-approve can bypass human review and needs separate governance.

C:

For the workstream in which an infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module, use this action: Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials. Terraform can fetch VCS modules by source address and Git ref, but source type controls version selection. Verify: Initialization checks out the intended Git module revision and the plan uses its configuration. Limitation: Git source refs and the registry module version argument are different mechanisms.

F:

For the workstream in which a workstation has Terraform CLI installed but a team wants the local CLI to invoke HCP Terraform remote runs and manage state, use this action: Configure a valid cloud block for the organization/workspace and authenticate with terraform login. Cloud integration associates the root module with managed HCP Terraform workspaces. Verify: The CLI connects to the HCP workspace and follows its selected remote execution and state workflow. Limitation: The working directory cannot combine cloud and backend blocks, and authentication remains required.

Incorrect Answers

B:

This action is appropriate instead for a different, unlisted requirement: A new environment needs to save state in a specific shared backend, and the team attempts to write backend settings under a resource block. It would be checked by: terraform init reports the selected backend and plan reads the correct shared state. 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 provider operation fails with an opaque authentication error and an engineer needs temporary, more detailed Terraform diagnostics. It would be checked by: Terraform emits relevant diagnostic details to stderr while the log setting is enabled. 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 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.

Question 161

An infrastructure team faces this specific situation: A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. Which Terraform action most directly satisfies the requirement?

  1. Use terraform validate against initialized providers to catch unsupported or missing arguments.
  2. Use terraform validate for the initialized configuration, then separately test variable values during a plan.
  3. Select the correct workspace/backend state and run terraform destroy only after reviewing its destruction plan.
  4. Use terraform init -migrate-state when intending to copy existing state to the new backend.

Explanation

Correct Answer

C:

Select the correct workspace/backend state and run terraform destroy only after reviewing its destruction plan. Destroy targets resources Terraform manages in the selected state. Verify: The destruction plan lists the managed objects targeted in that state, not arbitrary cloud resources. Limitation: Provider dependencies and shared infrastructure still require a risk review before deletion.

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 decision is: Use terraform validate against initialized providers to catch unsupported or missing arguments. For the question's actual requirement — A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. — the specifically relevant decision is: Select the correct workspace/backend state and run terraform destroy only after reviewing its destruction plan. It would therefore not resolve or assess the case as stated.

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 decision is: Use terraform validate for the initialized configuration, then separately test variable values during a plan. For the question's actual requirement — A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. — the specifically relevant decision is: Select the correct workspace/backend state and run terraform destroy only after reviewing its destruction plan. 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 decision is: Use terraform init -migrate-state when intending to copy existing state to the new backend. For the question's actual requirement — A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. — the specifically relevant decision is: Select the correct workspace/backend state and run terraform destroy only after reviewing its destruction plan. It would therefore not resolve or assess the case as stated.

Question 162

A reviewer is confirming a change for the following use case: A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. The implementation follows this approach: Select the correct workspace/backend state and run terraform destroy only after reviewing its destruction plan. Which observation or acceptance test most directly verifies the intended result?

  1. The destruction plan lists the managed objects targeted in that state, not arbitrary cloud resources.
  2. The validate command reports whether the configuration passes Terraform's static checks.
  3. The formatting check succeeds on canonical HCL layout without cloud API changes.
  4. CI captures and classifies the command exit code separately from console prose.

Explanation

Correct Answer

A:

Acceptance evidence: The destruction plan lists the managed objects targeted in that state, not arbitrary cloud resources. It validates the proposed action, select the correct workspace/backend state and run terraform destroy only after reviewing its destruction plan, because destroy targets resources Terraform manages in the selected state. Remaining limitation: Provider dependencies and shared infrastructure still require a risk review before deletion.

Incorrect Answers

B:

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 disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. — the specifically relevant acceptance is: The destruction plan lists the managed objects targeted in that state, not arbitrary cloud resources. It would therefore not resolve or assess the case as stated.

C:

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 disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. — the specifically relevant acceptance is: The destruction plan lists the managed objects targeted in that state, not arbitrary cloud resources. 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 disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. — the specifically relevant acceptance is: The destruction plan lists the managed objects targeted in that state, not arbitrary cloud resources. It would therefore not resolve or assess the case as stated.

Question 163

Consider a proposed solution for this requirement: A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. The team plans to do the following: Select the correct workspace/backend state and run terraform destroy only after reviewing its destruction plan. Which limitation or operational caveat must remain in the review?

  1. Plan is not a guarantee that nothing changes between its read and a later apply.
  2. A speculative plan can become stale and must not be mistaken for an approval to apply.
  3. Some custom conditions depend on actual input or resource values and cannot all be exercised by validate alone.
  4. Provider dependencies and shared infrastructure still require a risk review before deletion.

Explanation

Correct Answer

D:

The limitation is provider dependencies and shared infrastructure still require a risk review before deletion. The proposed change is select the correct workspace/backend state and run terraform destroy only after reviewing its destruction plan. Validate it by checking the destruction plan lists the managed objects targeted in that state, not arbitrary cloud resources. Destroy targets resources Terraform manages in the selected state.

Incorrect Answers

A:

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 limitation is: Plan is not a guarantee that nothing changes between its read and a later apply. For the question's actual requirement — A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. — the specifically relevant limitation is: Provider dependencies and shared infrastructure still require a risk review before deletion. It would therefore not resolve or assess the case as stated.

B:

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 limitation is: A speculative plan can become stale and must not be mistaken for an approval to apply. For the question's actual requirement — A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. — the specifically relevant limitation is: Provider dependencies and shared infrastructure still require a risk review before deletion. 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 disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. — the specifically relevant limitation is: Provider dependencies and shared infrastructure still require a risk review before deletion. It would therefore not resolve or assess the case as stated.

Question 164

The team is reviewing a Terraform implementation for this case: A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Delete terraform.tfstate just because initialization is being repeated.
  2. Run terraform fmt expecting it to download providers and configure the backend.
  3. Assume terraform destroy deletes every resource in the cloud subscription regardless of state ownership.
  4. Run terraform apply against an uninitialized directory and assume plugins are installed automatically at runtime.

Explanation

Correct Answer

C:

Reject the assumption: Assume terraform destroy deletes every resource in the cloud subscription regardless of state ownership. Instead, select the correct workspace/backend state and run terraform destroy only after reviewing its destruction plan. Destroy targets resources Terraform manages in the selected state. Acceptance evidence: The destruction plan lists the managed objects targeted in that state, not arbitrary cloud resources.

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 misconception is: Delete terraform.tfstate just because initialization is being repeated. For the question's actual requirement — A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. — the specifically relevant misconception is: Assume terraform destroy deletes every resource in the cloud subscription regardless of state ownership. It would therefore not resolve or assess the case as stated.

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 misconception is: Run terraform fmt expecting it to download providers and configure the backend. For the question's actual requirement — A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. — the specifically relevant misconception is: Assume terraform destroy deletes every resource in the cloud subscription regardless of state ownership. It would therefore not resolve or assess the case as stated.

D:

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 disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. — the specifically relevant misconception is: Assume terraform destroy deletes every resource in the cloud subscription regardless of state ownership. It would therefore not resolve or assess the case as stated.

Question 165

A Terraform platform team is coordinating 2 independent decisions. Workstream A: A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. and Workstream B: A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. Select exactly 2 actions, one addressing each distinct workstream.

  1. Generate and review a plan for the import block, optionally using supported configuration generation where appropriate.
  2. Configure the workspace's VCS connection, working directory, and run triggers for the intended branch.
  3. Use an ephemeral input value in an allowed Terraform ephemeral context, such as a supported provider configuration.
  4. Select the correct workspace/backend state and run terraform destroy only after reviewing its destruction plan.
  5. Specify the Git module source with the double-slash subdirectory syntax after the repository path.

Explanation

Correct Answers

D:

For the workstream in which a disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state, use this action: Select the correct workspace/backend state and run terraform destroy only after reviewing its destruction plan. Destroy targets resources Terraform manages in the selected state. Verify: The destruction plan lists the managed objects targeted in that state, not arbitrary cloud resources. Limitation: Provider dependencies and shared infrastructure still require a risk review before deletion.

E:

For the workstream in which a monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder, use this action: Specify the Git module source with the double-slash subdirectory syntax after the repository path. Module source syntax can identify both a remote package and its internal module subdirectory. Verify: Initialization loads only the intended child configuration rooted at the named subdirectory. Limitation: The repository must remain accessible, and the subdirectory must actually contain valid Terraform module files.

Incorrect Answers

A:

This option addresses a separate requirement: A new import block is committed for a resource whose configuration is incomplete and the team wants a review before apply. Evidence for that other requirement would be the plan shows import actions and any additional changes needed to align desired configuration; neither listed workstream asks for it.

B:

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.

C:

This option addresses a separate requirement: A short-lived token must be used during an operation, and auditors require that the token not be written to a plan file. Evidence for that other requirement would be the ephemeral value is supplied for the operation but omitted from saved state and plan data; neither listed workstream asks for it.

Question 166

An infrastructure team faces this specific situation: A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. Which Terraform action most directly satisfies the requirement?

  1. Run terraform plan -destroy to inspect the destruction actions without applying them.
  2. Use terraform validate for the initialized configuration, then separately test variable values during a plan.
  3. Review the generated plan and approve the apply prompt only if the changes are intended.
  4. Use terraform validate against initialized providers to catch unsupported or missing arguments.

Explanation

Correct Answer

A:

Run terraform plan -destroy to inspect the destruction actions without applying them. Destroy mode in plan provides an inspectable preview for teardown. Verify: The output enumerates expected managed-object deletions and remains speculative. Limitation: The resulting preview may not capture externally managed objects or later drift.

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 decision is: Use terraform validate for the initialized configuration, then separately test variable values during a plan. For the question's actual requirement — A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. — the specifically relevant decision is: Run terraform plan -destroy to inspect the destruction actions without applying them. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A developer executes terraform apply interactively without a plan file and sees a proposed change summary. There the relevant decision is: Review the generated plan and approve the apply prompt only if the changes are intended. For the question's actual requirement — A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. — the specifically relevant decision is: Run terraform plan -destroy to inspect the destruction actions without applying them. 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 decision is: Use terraform validate against initialized providers to catch unsupported or missing arguments. For the question's actual requirement — A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. — the specifically relevant decision is: Run terraform plan -destroy to inspect the destruction actions without applying them. It would therefore not resolve or assess the case as stated.

Question 167

A reviewer is confirming a change for the following use case: A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. The implementation follows this approach: Run terraform plan -destroy to inspect the destruction actions without applying them. Which observation or acceptance test most directly verifies the intended result?

  1. The command returns a plan showing resource actions without executing them.
  2. The formatting check succeeds on canonical HCL layout without cloud API changes.
  3. The output enumerates expected managed-object deletions and remains speculative.
  4. The apply consumes the named plan artifact and uses its previously selected actions and variable values.

Explanation

Correct Answer

C:

Acceptance evidence: The output enumerates expected managed-object deletions and remains speculative. It validates the proposed action, run terraform plan -destroy to inspect the destruction actions without applying them, because destroy mode in plan provides an inspectable preview for teardown. Remaining limitation: The resulting preview may not capture externally managed objects or later drift.

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 acceptance is: The command returns a plan showing resource actions without executing them. For the question's actual requirement — A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. — the specifically relevant acceptance is: The output enumerates expected managed-object deletions and remains speculative. It would therefore not resolve or assess the case as stated.

B:

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 training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. — the specifically relevant acceptance is: The output enumerates expected managed-object deletions and remains speculative. It would therefore not resolve or assess the case as stated.

D:

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 acceptance is: The apply consumes the named plan artifact and uses its previously selected actions and variable values. For the question's actual requirement — A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. — the specifically relevant acceptance is: The output enumerates expected managed-object deletions and remains speculative. It would therefore not resolve or assess the case as stated.

Question 168

Consider a proposed solution for this requirement: A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. The team plans to do the following: Run terraform plan -destroy to inspect the destruction actions without applying them. Which limitation or operational caveat must remain in the review?

  1. Back up state and ensure target backend permissions before migrating; -reconfigure does not migrate.
  2. Sensitive plan files require protection; a changed state can invalidate an old plan.
  3. The resulting preview may not capture externally managed objects or later drift.
  4. Validation cannot prove provider API permissions, quota availability, or runtime object existence.

Explanation

Correct Answer

C:

The limitation is the resulting preview may not capture externally managed objects or later drift. The proposed change is run terraform plan -destroy to inspect the destruction actions without applying them. Validate it by checking the output enumerates expected managed-object deletions and remains speculative. Destroy mode in plan provides an inspectable preview for teardown.

Incorrect Answers

A:

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 limitation is: Back up state and ensure target backend permissions before migrating; -reconfigure does not migrate. For the question's actual requirement — A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. — the specifically relevant limitation is: The resulting preview may not capture externally managed objects or later drift. It would therefore not resolve or assess the case as stated.

B:

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 training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. — the specifically relevant limitation is: The resulting preview may not capture externally managed objects or later drift. It would therefore not resolve or assess the case as stated.

D:

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 limitation is: Validation cannot prove provider API permissions, quota availability, or runtime object existence. For the question's actual requirement — A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. — the specifically relevant limitation is: The resulting preview may not capture externally managed objects or later drift. It would therefore not resolve or assess the case as stated.

Question 169

The team is reviewing a Terraform implementation for this case: A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Run terraform plan again and treat its output as if it already executed the changes.
  2. Use terraform destroy assuming it is always a preview-only operation.
  3. Run terraform apply against an uninitialized directory and assume plugins are installed automatically at runtime.
  4. Run terraform apply to standardize whitespace in .tf files.

Explanation

Correct Answer

B:

Reject the assumption: Use terraform destroy assuming it is always a preview-only operation. Instead, run terraform plan -destroy to inspect the destruction actions without applying them. Destroy mode in plan provides an inspectable preview for teardown. Acceptance evidence: The output enumerates expected managed-object deletions and remains speculative.

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 misconception is: Run terraform plan again and treat its output as if it already executed the changes. For the question's actual requirement — A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. — the specifically relevant misconception is: Use terraform destroy assuming it is always a preview-only operation. 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 training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. — the specifically relevant misconception is: Use terraform destroy assuming it is always a preview-only operation. 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 misconception is: Run terraform apply to standardize whitespace in .tf files. For the question's actual requirement — A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. — the specifically relevant misconception is: Use terraform destroy assuming it is always a preview-only operation. It would therefore not resolve or assess the case as stated.

Question 170

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. and Workstream B: A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. and Workstream C: A security team wants engineers to see policy violations without initially blocking learning-environment applies. Select exactly 3 actions, one addressing each distinct workstream.

  1. Declare resources through separate compatible providers in one Terraform configuration, with references for dependencies.
  2. Run terraform plan -destroy to inspect the destruction actions without applying them.
  3. Use an advisory policy enforcement setting on the learning workspaces and monitor the warnings.
  4. Declare one backend block inside terraform and reinitialize the working directory.
  5. Declare the input in the child and supply environment = var.environment in the root's module call.
  6. Pass a different root provider configuration into each module call through its providers map.

Explanation

Correct Answers

B:

For the workstream in which a training team wants to preview removal of all managed sandbox objects but not execute the deletion yet, use this action: Run terraform plan -destroy to inspect the destruction actions without applying them. Destroy mode in plan provides an inspectable preview for teardown. Verify: The output enumerates expected managed-object deletions and remains speculative. Limitation: The resulting preview may not capture externally managed objects or later drift.

C:

For the workstream in which a security team wants engineers to see policy violations without initially blocking learning-environment applies, use this action: Use an advisory policy enforcement setting on the learning workspaces and monitor the warnings. Advisory policies surface governance guidance without being mandatory blockers. Verify: Violating plans produce visible advisory policy findings while runs remain allowed to continue. Limitation: Advisory is not the right choice for mandatory production enforcement requirements.

E:

For the workstream in which a child module uses var.environment but the root module declares an environment variable of the same name and passes nothing, use this action: Declare the input in the child and supply environment = var.environment in the root's module call. Explicit variable arguments make the child module interface predictable. Verify: Planning resolves the child's environment value from the explicit module call. Limitation: Input variables are scoped to each module and do not implicitly leak across module boundaries.

Incorrect Answers

A:

This action is appropriate instead for a different, unlisted requirement: A logistics firm needs a private data-center virtual machine and a public-cloud DNS record managed from one reviewed release. It would be checked by: A single plan lists the intended private and public resource actions under their respective providers. 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 new environment needs to save state in a specific shared backend, and the team attempts to write backend settings under a resource block. It would be checked by: terraform init reports the selected backend and plan reads the correct shared state. 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.

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.