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 10

Question 90

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A storage bucket exists in the cloud, but Terraform proposes creating another bucket with the intended name because its state has no binding. and Workstream B: A firewall rule should be provisioned only after a policy attachment exists, but the rule's arguments do not reference that attachment. and Workstream C: A company intentionally altered remote settings and wants Terraform state to reflect the real objects without proposing configuration-driven remediation yet. Select exactly 3 actions, one addressing each distinct workstream.

  1. Review the HCL change through version control and inspect a Terraform execution plan before authorized apply.
  2. Create a child module with declared input variables, resource blocks, and output values, then invoke it from a root module.
  3. Use for_each on the module block and reference module.stack["test"].endpoint.
  4. Import the existing bucket into an appropriate resource address after writing matching configuration.
  5. Run a refresh-only plan, review its state changes, and apply refresh-only if the update is appropriate.
  6. Add an explicit depends_on referencing the policy attachment resource for the hidden operational dependency.

Explanation

Correct Answers

D:

For the workstream in which a storage bucket exists in the cloud, but Terraform proposes creating another bucket with the intended name because its state has no binding, use this action: Import the existing bucket into an appropriate resource address after writing matching configuration. Import establishes an address-to-object state binding for an already-created resource. Verify: The state lists the imported address, and a subsequent plan can be evaluated for unintended differences. Limitation: Import does not invent complete desired configuration or guarantee a no-op plan.

E:

For the workstream in which a company intentionally altered remote settings and wants Terraform state to reflect the real objects without proposing configuration-driven remediation yet, use this action: Run a refresh-only plan, review its state changes, and apply refresh-only if the update is appropriate. Refresh-only updates Terraform's recorded understanding rather than enforcing desired configuration. Verify: State and root outputs synchronize with observed remote data without changing the cloud object itself. Limitation: Refresh-only does not make configuration match reality or prevent later normal plans from proposing remediation.

F:

For the workstream in which a firewall rule should be provisioned only after a policy attachment exists, but the rule's arguments do not reference that attachment, use this action: Add an explicit depends_on referencing the policy attachment resource for the hidden operational dependency. depends_on expresses ordering when Terraform cannot infer it from attribute references. Verify: The dependency graph orders the attachment action before the dependent rule operation. Limitation: Explicit dependencies should be limited to real hidden dependencies; excessive depends_on can make plans conservative.

Incorrect Answers

A:

This action is appropriate instead for a different, unlisted requirement: An operations group wants four engineers to propose a subnet change without all four immediately modifying production. It would be checked by: A pull request includes configuration differences and a plan describing expected resource mutations. 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 team is packaging a repeated VPC pattern and wants a stable interface for internal consumers. It would be checked by: Consumers can pass environment-specific inputs and receive selected outputs without editing child internals. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

C:

This action is appropriate instead for a different, unlisted requirement: A module is instantiated for each environment in a map, and the root needs the output for the test environment. It would be checked by: The keyed module instance exposes only the test environment's selected output. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

Question 91

An infrastructure team faces this specific situation: A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. Which Terraform action most directly satisfies the requirement?

  1. Use the provider's supported environment or workload identity authentication mechanism rather than embedding credential literals.
  2. Declare separate supported Kubernetes and DNS providers and use their respective resource types in the same root module.
  3. Distinguish provider-version lock metadata from terraform.tfstate and protect the actual state through suitable backend controls.
  4. Run terraform init -upgrade after reviewing the intended provider compatibility change.

Explanation

Correct Answer

C:

Distinguish provider-version lock metadata from terraform.tfstate and protect the actual state through suitable backend controls. Provider dependency locking and infrastructure state solve different problems. Verify: Inspection shows the lock file describes plugin versions while state records resource attributes and bindings. Limitation: State may include confidential values even when CLI output hides sensitive variable contents.

Incorrect Answers

A:

This is linked to a different situation: A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. There the relevant decision is: Use the provider's supported environment or workload identity authentication mechanism rather than embedding credential literals. For the question's actual requirement — A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. — the specifically relevant decision is: Distinguish provider-version lock metadata from terraform.tfstate and protect the actual state through suitable backend controls. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A newly created project uses both a Kubernetes cluster and cloud DNS records, and the same release should manage them coherently. There the relevant decision is: Declare separate supported Kubernetes and DNS providers and use their respective resource types in the same root module. For the question's actual requirement — A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. — the specifically relevant decision is: Distinguish provider-version lock metadata from terraform.tfstate and protect the actual state through suitable backend controls. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A project intentionally needs a newer provider version allowed by its constraints, but init keeps reusing the version recorded in the lock file. There the relevant decision is: Run terraform init -upgrade after reviewing the intended provider compatibility change. For the question's actual requirement — A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. — the specifically relevant decision is: Distinguish provider-version lock metadata from terraform.tfstate and protect the actual state through suitable backend controls. It would therefore not resolve or assess the case as stated.

Question 92

A reviewer is confirming a change for the following use case: A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. The implementation follows this approach: Distinguish provider-version lock metadata from terraform.tfstate and protect the actual state through suitable backend controls. Which observation or acceptance test most directly verifies the intended result?

  1. Inspection shows the lock file describes plugin versions while state records resource attributes and bindings.
  2. The updated .terraform.lock.hcl records the newly selected compatible provider and its checksums.
  3. The provider authenticates through the supported runtime identity without secrets appearing in committed configuration.
  4. The chosen provider version and checksums are recorded in the lock file after initialization.

Explanation

Correct Answer

A:

Acceptance evidence: Inspection shows the lock file describes plugin versions while state records resource attributes and bindings. It validates the proposed action, distinguish provider-version lock metadata from terraform.tfstate and protect the actual state through suitable backend controls, because provider dependency locking and infrastructure state solve different problems. Remaining limitation: State may include confidential values even when CLI output hides sensitive variable contents.

Incorrect Answers

B:

This is linked to a different situation: A project intentionally needs a newer provider version allowed by its constraints, but init keeps reusing the version recorded in the lock file. There the relevant acceptance is: The updated .terraform.lock.hcl records the newly selected compatible provider and its checksums. For the question's actual requirement — A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. — the specifically relevant acceptance is: Inspection shows the lock file describes plugin versions while state records resource attributes and bindings. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. There the relevant acceptance is: The provider authenticates through the supported runtime identity without secrets appearing in committed configuration. For the question's actual requirement — A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. — the specifically relevant acceptance is: Inspection shows the lock file describes plugin versions while state records resource attributes and bindings. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A team pins the AWS provider below 6.0 but a new contractor runs init and unexpectedly resolves a higher patch than other developers. There the relevant acceptance is: The chosen provider version and checksums are recorded in the lock file after initialization. For the question's actual requirement — A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. — the specifically relevant acceptance is: Inspection shows the lock file describes plugin versions while state records resource attributes and bindings. It would therefore not resolve or assess the case as stated.

Question 93

Consider a proposed solution for this requirement: A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. The team plans to do the following: Distinguish provider-version lock metadata from terraform.tfstate and protect the actual state through suitable backend controls. Which limitation or operational caveat must remain in the review?

  1. Provider local names in HCL do not by themselves prove the external publisher namespace.
  2. State may include confidential values even when CLI output hides sensitive variable contents.
  3. Provider settings do not guarantee permission to create any resource without valid credentials and IAM rights.
  4. Do not put shared provider configuration blocks inside a modern reusable child module to solve this mapping.

Explanation

Correct Answer

B:

The limitation is state may include confidential values even when CLI output hides sensitive variable contents. The proposed change is distinguish provider-version lock metadata from terraform.tfstate and protect the actual state through suitable backend controls. Validate it by checking inspection shows the lock file describes plugin versions while state records resource attributes and bindings. Provider dependency locking and infrastructure state solve different problems.

Incorrect Answers

A:

This is linked to a different situation: A service module declares use of a third-party provider but two different namespaces publish plugins with the same local name. There the relevant limitation is: Provider local names in HCL do not by themselves prove the external publisher namespace. For the question's actual requirement — A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. — the specifically relevant limitation is: State may include confidential values even when CLI output hides sensitive variable contents. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: An engineer thinks the provider block installs the AWS provider and a resource block selects the AWS account by itself. There the relevant limitation is: Provider settings do not guarantee permission to create any resource without valid credentials and IAM rights. For the question's actual requirement — A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. — the specifically relevant limitation is: State may include confidential values even when CLI output hides sensitive variable contents. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A security team calls the same reusable child module twice, once under each of two cloud accounts. There the relevant limitation is: Do not put shared provider configuration blocks inside a modern reusable child module to solve this mapping. For the question's actual requirement — A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. — the specifically relevant limitation is: State may include confidential values even when CLI output hides sensitive variable contents. It would therefore not resolve or assess the case as stated.

Question 94

The team is reviewing a Terraform implementation for this case: A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Assume the child automatically inherits all aliases merely because it inherits an unaliased provider.
  2. Use a resource type label as a replacement for explicit provider endpoint or account configuration.
  3. Treat a single Kubernetes provider as a universal interface to every cloud DNS service.
  4. Treat provider dependency checksums as the definitive list of deployed infrastructure resources.

Explanation

Correct Answer

D:

Reject the assumption: Treat provider dependency checksums as the definitive list of deployed infrastructure resources. Instead, distinguish provider-version lock metadata from terraform.tfstate and protect the actual state through suitable backend controls. Provider dependency locking and infrastructure state solve different problems. Acceptance evidence: Inspection shows the lock file describes plugin versions while state records resource attributes and bindings.

Incorrect Answers

A:

This is linked to a different situation: A child network module expects two AWS provider aliases, but the root module has only passed its default provider. There the relevant misconception is: Assume the child automatically inherits all aliases merely because it inherits an unaliased provider. For the question's actual requirement — A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. — the specifically relevant misconception is: Treat provider dependency checksums as the definitive list of deployed infrastructure resources. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: An engineer thinks the provider block installs the AWS provider and a resource block selects the AWS account by itself. There the relevant misconception is: Use a resource type label as a replacement for explicit provider endpoint or account configuration. For the question's actual requirement — A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. — the specifically relevant misconception is: Treat provider dependency checksums as the definitive list of deployed infrastructure resources. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A newly created project uses both a Kubernetes cluster and cloud DNS records, and the same release should manage them coherently. There the relevant misconception is: Treat a single Kubernetes provider as a universal interface to every cloud DNS service. For the question's actual requirement — A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. — the specifically relevant misconception is: Treat provider dependency checksums as the definitive list of deployed infrastructure resources. It would therefore not resolve or assess the case as stated.

Question 95

A Terraform platform team is coordinating 2 independent decisions. Workstream A: A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. and Workstream B: A service cannot tolerate downtime when replacing a VM and the provider's planned operation requires destroy-and-create. Select exactly 2 actions, one addressing each distinct workstream.

  1. Reuse one reviewed Terraform module with explicit environment inputs instead of independently editing each deployment.
  2. Consider lifecycle create_before_destroy on the managed resource after confirming simultaneous old and new instances are permitted.
  3. Distinguish provider-version lock metadata from terraform.tfstate and protect the actual state through suitable backend controls.
  4. Keep one authoritative managed address per remote object and refactor references accordingly.
  5. 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 service cannot tolerate downtime when replacing a VM and the provider's planned operation requires destroy-and-create, use this action: Consider lifecycle create_before_destroy on the managed resource after confirming simultaneous old and new instances are permitted. Lifecycle replacement ordering can reduce interruption but does not override provider or service constraints. Verify: The replacement plan creates the new instance before destroying the old one where provider constraints allow. Limitation: Unique names, fixed addresses, quotas, and dependent resources may prevent this pattern from succeeding.

C:

For the workstream in which a team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store, use this action: Distinguish provider-version lock metadata from terraform.tfstate and protect the actual state through suitable backend controls. Provider dependency locking and infrastructure state solve different problems. Verify: Inspection shows the lock file describes plugin versions while state records resource attributes and bindings. Limitation: State may include confidential values even when CLI output hides sensitive variable contents.

Incorrect Answers

A:

This option addresses a separate requirement: Two branches of a retailer deploy similar staging clusters, but each hand-built cluster gradually acquires different firewall rules. Evidence for that other requirement would be review version-control diffs and compare planned firewall changes for both environments; neither listed workstream asks for it.

D:

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.

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 96

An infrastructure team faces this specific situation: A newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. Which Terraform action most directly satisfies the requirement?

  1. Initialize the working directory, inspect a plan, and only then perform an authorized apply.
  2. Use terraform init -migrate-state when intending to copy existing state to the new backend.
  3. Run terraform plan -destroy to inspect the destruction actions without applying them.
  4. Use terraform validate against initialized providers to catch unsupported or missing arguments.

Explanation

Correct Answer

A:

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.

Incorrect Answers

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 decision is: Use terraform init -migrate-state when intending to copy existing state to the new backend. For the question's actual requirement — A newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. — the specifically relevant decision is: Initialize the working directory, inspect a plan, and only then perform an authorized apply. It would therefore not resolve or assess the case as stated.

C:

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 newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. — the specifically relevant decision is: Initialize the working directory, inspect a plan, and only then perform an authorized apply. 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 newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. — the specifically relevant decision is: Initialize the working directory, inspect a plan, and only then perform an authorized apply. It would therefore not resolve or assess the case as stated.

Question 97

A reviewer is confirming a change for the following use case: A newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. The implementation follows this approach: Initialize the working directory, inspect a plan, and only then perform an authorized apply. Which observation or acceptance test most directly verifies the intended result?

  1. The new backend holds the migrated state and a subsequent state list shows expected addresses.
  2. Terraform performs the saved proposed resource actions and updates state when successful.
  3. The initialization succeeds and the reviewed plan enumerates proposed actions before change execution.
  4. The proposed plan marks that particular resource instance for replacement.

Explanation

Correct Answer

C:

Acceptance evidence: The initialization succeeds and the reviewed plan enumerates proposed actions before change execution. It validates the proposed action, initialize the working directory, inspect a plan, and only then perform an authorized apply, because the standard write-init-plan-apply workflow separates preparation, preview, and execution. Remaining limitation: Commands may still fail on missing credentials, invalid cloud quotas, or forbidden API actions.

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 acceptance is: The new backend holds the migrated state and a subsequent state list shows expected addresses. For the question's actual requirement — A newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. — the specifically relevant acceptance is: The initialization succeeds and the reviewed plan enumerates proposed actions before change execution. 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 acceptance is: Terraform performs the saved proposed resource actions and updates state when successful. For the question's actual requirement — A newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. — the specifically relevant acceptance is: The initialization succeeds and the reviewed plan enumerates proposed actions before change execution. It would therefore not resolve or assess the case as stated.

D:

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 acceptance is: The proposed plan marks that particular resource instance for replacement. For the question's actual requirement — A newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. — the specifically relevant acceptance is: The initialization succeeds and the reviewed plan enumerates proposed actions before change execution. It would therefore not resolve or assess the case as stated.

Question 98

Consider a proposed solution for this requirement: A newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. The team plans to do the following: Initialize the working directory, inspect a plan, and only then perform an authorized apply. 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. Provider dependencies and shared infrastructure still require a risk review before deletion.
  4. Commands may still fail on missing credentials, invalid cloud quotas, or forbidden API actions.

Explanation

Correct Answer

D:

The limitation is commands may still fail on missing credentials, invalid cloud quotas, or forbidden API actions. The proposed change is initialize the working directory, inspect a plan, and only then perform an authorized apply. Validate it by checking the initialization succeeds and the reviewed plan enumerates proposed actions before change execution. The standard write-init-plan-apply workflow separates preparation, preview, and execution.

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 newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. — the specifically relevant limitation is: Commands may still fail on missing credentials, invalid cloud quotas, or forbidden API actions. 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 newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. — the specifically relevant limitation is: Commands may still fail on missing credentials, invalid cloud quotas, or forbidden API actions. It would therefore not resolve or assess the case as stated.

C:

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 newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. — the specifically relevant limitation is: Commands may still fail on missing credentials, invalid cloud quotas, or forbidden API actions. It would therefore not resolve or assess the case as stated.

Question 99

The team is reviewing a Terraform implementation for this case: A newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Use terraform destroy assuming it is always a preview-only operation.
  2. Run terraform fmt expecting it to download providers and configure the backend.
  3. Run terraform apply against an uninitialized directory and assume plugins are installed automatically at runtime.
  4. Assume terraform destroy deletes every resource in the cloud subscription regardless of state ownership.

Explanation

Correct Answer

C:

Reject the assumption: Run terraform apply against an uninitialized directory and assume plugins are installed automatically at runtime. Instead, 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. Acceptance evidence: The initialization succeeds and the reviewed plan enumerates proposed actions before change execution.

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 misconception is: Use terraform destroy assuming it is always a preview-only operation. For the question's actual requirement — A newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. — the specifically relevant misconception is: Run terraform apply against an uninitialized directory and assume plugins are installed automatically at runtime. 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 newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. — the specifically relevant misconception is: Run terraform apply against an uninitialized directory and assume plugins are installed automatically at runtime. 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 newly hired engineer has a reviewed HCL repository but has not yet prepared its providers or backend. — the specifically relevant misconception is: Run terraform apply against an uninitialized directory and assume plugins are installed automatically at runtime. It would therefore not resolve or assess the case as stated.

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.

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.