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 45

Question 440

A Terraform platform team is coordinating 3 independent decisions. Workstream A: An engineer asks whether selecting an S3 bucket as remote storage automatically guarantees supported state locking under every Terraform/backend version. and Workstream B: A team pins the AWS provider below 6.0 but a new contractor runs init and unexpectedly resolves a higher patch than other developers. and Workstream C: A deployment needs separate port numbers per environment and a documented default for developer sandboxes. Select exactly 3 actions, one addressing each distinct workstream.

  1. Check the exact backend's current locking configuration and version-specific requirements before assuming locks work.
  2. Keep one authoritative managed address per remote object and refactor references accordingly.
  3. Create a child module with declared input variables, resource blocks, and output values, then invoke it from a root module.
  4. Commit .terraform.lock.hcl and use required_providers version constraints to keep provider selection reproducible.
  5. Publish and consume approved modules through an HCP Terraform private module registry with reviewed versions.
  6. Declare an input variable with type number and an appropriate default, overriding it per environment when needed.

Explanation

Correct Answers

A:

For the workstream in which an engineer asks whether selecting an S3 bucket as remote storage automatically guarantees supported state locking under every Terraform/backend version, use this action: Check the exact backend's current locking configuration and version-specific requirements before assuming locks work. Backends vary in supported locking mechanisms and required configuration. Verify: A controlled test or backend documentation confirms a lock is obtained for state-mutating operations. Limitation: Storage location alone does not prove the required locking mechanism is configured or supported.

D:

For the workstream in which a team pins the AWS provider below 6.0 but a new contractor runs init and unexpectedly resolves a higher patch than other developers, use this action: Commit .terraform.lock.hcl and use required_providers version constraints to keep provider selection reproducible. The lock file preserves provider dependency selections within declared compatibility constraints. Verify: The chosen provider version and checksums are recorded in the lock file after initialization. Limitation: The dependency lock file locks provider selections, not an immutable Terraform CLI binary version.

F:

For the workstream in which a deployment needs separate port numbers per environment and a documented default for developer sandboxes, use this action: Declare an input variable with type number and an appropriate default, overriding it per environment when needed. Input variables parameterize a module; outputs report values out of the module. Verify: Plans show environment-specific port values while preserving the declared type constraint. Limitation: Defaults should not embed production secrets or bypass review of production-specific values.

Incorrect Answers

B:

This action is appropriate instead for a different, unlisted requirement: An engineer is importing one cloud instance but attempts to assign the same remote object to two Terraform resource addresses. It would be checked by: State inspection shows the imported instance at a single intended address. 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 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.

E:

This action is appropriate instead for a different, unlisted requirement: An organization wants approved modules discoverable by many teams without copying source trees into every repo. It would be checked by: Authorized workspaces resolve the approved private registry module during initialization. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

Question 441

An infrastructure team faces this specific situation: A new environment needs to save state in a specific shared backend, and the team attempts to write backend settings under a resource block. Which Terraform action most directly satisfies the requirement?

  1. Interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration.
  2. Run a refresh-only plan, review its state changes, and apply refresh-only if the update is appropriate.
  3. Declare one backend block inside terraform and reinitialize the working directory.
  4. Configure an appropriate supported remote backend with secure access and locking rather than emailing terraform.tfstate.

Explanation

Correct Answer

C:

Declare one backend block inside terraform and reinitialize the working directory. A terraform backend configuration controls state location independently of managed resource blocks. Verify: terraform init reports the selected backend and plan reads the correct shared state. Limitation: Backend arguments cannot reference ordinary input variables or data-source attributes.

Incorrect Answers

A:

This is linked to a different situation: An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. There the relevant decision is: Interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration. For the question's actual 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. — the specifically relevant decision is: Declare one backend block inside terraform and reinitialize the working directory. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A company intentionally altered remote settings and wants Terraform state to reflect the real objects without proposing configuration-driven remediation yet. There the relevant decision is: Run a refresh-only plan, review its state changes, and apply refresh-only if the update is appropriate. For the question's actual 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. — the specifically relevant decision is: Declare one backend block inside terraform and reinitialize the working directory. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A team's state file is stored on a laptop and must be shared across several engineers without copying it manually after every change. There the relevant decision is: Configure an appropriate supported remote backend with secure access and locking rather than emailing terraform.tfstate. For the question's actual 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. — the specifically relevant decision is: Declare one backend block inside terraform and reinitialize the working directory. It would therefore not resolve or assess the case as stated.

Question 442

A reviewer is confirming a change for the following use case: A new environment needs to save state in a specific shared backend, and the team attempts to write backend settings under a resource block. The implementation follows this approach: Declare one backend block inside terraform and reinitialize the working directory. Which observation or acceptance test most directly verifies the intended result?

  1. Multiple team members read one central state snapshot and serialized operations when the backend supports locking.
  2. terraform init reports the selected backend and plan reads the correct shared state.
  3. A controlled test or backend documentation confirms a lock is obtained for state-mutating operations.
  4. State and root outputs synchronize with observed remote data without changing the cloud object itself.

Explanation

Correct Answer

B:

Acceptance evidence: terraform init reports the selected backend and plan reads the correct shared state. It validates the proposed action, declare one backend block inside terraform and reinitialize the working directory, because a terraform backend configuration controls state location independently of managed resource blocks. Remaining limitation: Backend arguments cannot reference ordinary input variables or data-source attributes.

Incorrect Answers

A:

This is linked to a different situation: A team's state file is stored on a laptop and must be shared across several engineers without copying it manually after every change. There the relevant acceptance is: Multiple team members read one central state snapshot and serialized operations when the backend supports locking. For the question's actual 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. — the specifically relevant acceptance is: terraform init reports the selected backend and plan reads the correct shared state. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: An engineer asks whether selecting an S3 bucket as remote storage automatically guarantees supported state locking under every Terraform/backend version. There the relevant acceptance is: A controlled test or backend documentation confirms a lock is obtained for state-mutating operations. For the question's actual 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. — the specifically relevant acceptance is: terraform init reports the selected backend and plan reads the correct shared state. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A company intentionally altered remote settings and wants Terraform state to reflect the real objects without proposing configuration-driven remediation yet. There the relevant acceptance is: State and root outputs synchronize with observed remote data without changing the cloud object itself. For the question's actual 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. — the specifically relevant acceptance is: terraform init reports the selected backend and plan reads the correct shared state. It would therefore not resolve or assess the case as stated.

Question 443

Consider a proposed solution for this 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. The team plans to do the following: Declare one backend block inside terraform and reinitialize the working directory. Which limitation or operational caveat must remain in the review?

  1. Backend arguments cannot reference ordinary input variables or data-source attributes.
  2. Force unlocking a live operation can permit multiple writers and corrupt state.
  3. Not every remote change is actionable drift; provider-computed attributes and intentional shared ownership need consideration.
  4. Locking support depends on backend type; disabling locks invites state corruption.

Explanation

Correct Answer

A:

The limitation is backend arguments cannot reference ordinary input variables or data-source attributes. The proposed change is declare one backend block inside terraform and reinitialize the working directory. Validate it by checking terraform init reports the selected backend and plan reads the correct shared state. A terraform backend configuration controls state location independently of managed resource blocks.

Incorrect Answers

B:

This is linked to a different situation: A Terraform job crashed and left a stale lock, but the team has not verified whether any other run is active. There the relevant limitation is: Force unlocking a live operation can permit multiple writers and corrupt state. For the question's actual 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. — the specifically relevant limitation is: Backend arguments cannot reference ordinary input variables or data-source attributes. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. There the relevant limitation is: Not every remote change is actionable drift; provider-computed attributes and intentional shared ownership need consideration. For the question's actual 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. — the specifically relevant limitation is: Backend arguments cannot reference ordinary input variables or data-source attributes. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: Two release pipelines try to update the same remote state simultaneously and one sees a lock-acquisition failure. There the relevant limitation is: Locking support depends on backend type; disabling locks invites state corruption. For the question's actual 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. — the specifically relevant limitation is: Backend arguments cannot reference ordinary input variables or data-source attributes. It would therefore not resolve or assess the case as stated.

Question 444

The team is reviewing a Terraform implementation for this case: A new environment needs to save state in a specific shared backend, and the team attempts to write backend settings under a resource block. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Retry with -lock=false while the other pipeline is actively writing the same state.
  2. Keep separate laptop-local states and manually merge their JSON content after each apply.
  3. Use a provider resource block as the place Terraform decides where its own state is stored.
  4. Assume unchanged Terraform files imply remote infrastructure cannot drift.

Explanation

Correct Answer

C:

Reject the assumption: Use a provider resource block as the place Terraform decides where its own state is stored. Instead, declare one backend block inside terraform and reinitialize the working directory. A terraform backend configuration controls state location independently of managed resource blocks. Acceptance evidence: terraform init reports the selected backend and plan reads the correct shared state.

Incorrect Answers

A:

This is linked to a different situation: Two release pipelines try to update the same remote state simultaneously and one sees a lock-acquisition failure. There the relevant misconception is: Retry with -lock=false while the other pipeline is actively writing the same state. For the question's actual 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. — the specifically relevant misconception is: Use a provider resource block as the place Terraform decides where its own state is stored. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A team's state file is stored on a laptop and must be shared across several engineers without copying it manually after every change. There the relevant misconception is: Keep separate laptop-local states and manually merge their JSON content after each apply. For the question's actual 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. — the specifically relevant misconception is: Use a provider resource block as the place Terraform decides where its own state is stored. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. There the relevant misconception is: Assume unchanged Terraform files imply remote infrastructure cannot drift. For the question's actual 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. — the specifically relevant misconception is: Use a provider resource block as the place Terraform decides where its own state is stored. It would therefore not resolve or assess the case as stated.

Question 445

A Terraform platform team is coordinating 2 independent decisions. Workstream A: A new environment needs to save state in a specific shared backend, and the team attempts to write backend settings under a resource block. and Workstream B: A project intentionally needs a newer provider version allowed by its constraints, but init keeps reusing the version recorded in the lock file. Select exactly 2 actions, one addressing each distinct workstream.

  1. Write a matching resource declaration and use an import block or terraform import with the real object identifier.
  2. Declare an output in the child module and reference module.app.database_hostname from the root.
  3. Reference the local path with source = "./modules/security" inside the module block.
  4. Declare one backend block inside terraform and reinitialize the working directory.
  5. Run terraform init -upgrade after reviewing the intended provider compatibility change.

Explanation

Correct Answers

D:

For the workstream in which a new environment needs to save state in a specific shared backend, and the team attempts to write backend settings under a resource block, use this action: Declare one backend block inside terraform and reinitialize the working directory. A terraform backend configuration controls state location independently of managed resource blocks. Verify: terraform init reports the selected backend and plan reads the correct shared state. Limitation: Backend arguments cannot reference ordinary input variables or data-source attributes.

E:

For the workstream in which a project intentionally needs a newer provider version allowed by its constraints, but init keeps reusing the version recorded in the lock file, use this action: Run terraform init -upgrade after reviewing the intended provider compatibility change. Initialization with -upgrade reconsideres allowed plugin versions instead of honoring the previous lock selection. Verify: The updated .terraform.lock.hcl records the newly selected compatible provider and its checksums. Limitation: Upgrading may change provider behavior, so review plans and release notes before applying.

Incorrect Answers

A:

This option addresses a separate requirement: A database already exists outside Terraform but needs to become managed under an explicit new resource address. Evidence for that other requirement would be state gains the intended address and a reviewed plan evaluates remaining configuration differences; neither listed workstream asks for it.

B:

This option addresses a separate requirement: A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. Evidence for that other requirement would be the root output reads the child's exported value after apply or when known; neither listed workstream asks for it.

C:

This option addresses a separate requirement: A security group module lives in the local modules/security directory of the same versioned repository. Evidence for that other requirement would be terraform reads the local child module without fetching it from a remote registry; neither listed workstream asks for it.

Question 446

An infrastructure team faces this specific situation: A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. Which Terraform action most directly satisfies the requirement?

  1. Use an appropriate moved block to preserve the instance's state address during the refactor.
  2. Run a refresh-only plan, review its state changes, and apply refresh-only if the update is appropriate.
  3. Confirm there is no current state writer, then use force-unlock only for the team's own stale lock ID.
  4. Use supported environment-based backend credentials or identity rather than embedding credentials in backend configuration.

Explanation

Correct Answer

D:

Use supported environment-based backend credentials or identity rather than embedding credentials in backend configuration. State backends need their own secure authentication channel; configuration literals are not automatically secret-safe. Verify: Backend initialization succeeds without static access keys embedded in .terraform or saved plan artifacts. Limitation: Backend configuration data can be captured in local initialization metadata and plan files.

Incorrect Answers

A:

This is linked to a different situation: A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. There the relevant decision is: Use an appropriate moved block to preserve the instance's state address during the refactor. For the question's actual requirement — A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. — the specifically relevant decision is: Use supported environment-based backend credentials or identity rather than embedding credentials in backend configuration. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A company intentionally altered remote settings and wants Terraform state to reflect the real objects without proposing configuration-driven remediation yet. There the relevant decision is: Run a refresh-only plan, review its state changes, and apply refresh-only if the update is appropriate. For the question's actual requirement — A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. — the specifically relevant decision is: Use supported environment-based backend credentials or identity rather than embedding credentials in backend configuration. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A Terraform job crashed and left a stale lock, but the team has not verified whether any other run is active. There the relevant decision is: Confirm there is no current state writer, then use force-unlock only for the team's own stale lock ID. For the question's actual requirement — A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. — the specifically relevant decision is: Use supported environment-based backend credentials or identity rather than embedding credentials in backend configuration. It would therefore not resolve or assess the case as stated.

Question 447

A reviewer is confirming a change for the following use case: A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. The implementation follows this approach: Use supported environment-based backend credentials or identity rather than embedding credentials in backend configuration. Which observation or acceptance test most directly verifies the intended result?

  1. The plan reports an address move instead of unnecessary destruction and recreation.
  2. Backend initialization succeeds without static access keys embedded in .terraform or saved plan artifacts.
  3. A controlled test or backend documentation confirms a lock is obtained for state-mutating operations.
  4. The reviewed plan explains which observed remote attributes differ from desired HCL.

Explanation

Correct Answer

B:

Acceptance evidence: Backend initialization succeeds without static access keys embedded in .terraform or saved plan artifacts. It validates the proposed action, use supported environment-based backend credentials or identity rather than embedding credentials in backend configuration, because state backends need their own secure authentication channel; configuration literals are not automatically secret-safe. Remaining limitation: Backend configuration data can be captured in local initialization metadata and plan files.

Incorrect Answers

A:

This is linked to a different situation: A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. There the relevant acceptance is: The plan reports an address move instead of unnecessary destruction and recreation. For the question's actual requirement — A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. — the specifically relevant acceptance is: Backend initialization succeeds without static access keys embedded in .terraform or saved plan artifacts. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: An engineer asks whether selecting an S3 bucket as remote storage automatically guarantees supported state locking under every Terraform/backend version. There the relevant acceptance is: A controlled test or backend documentation confirms a lock is obtained for state-mutating operations. For the question's actual requirement — A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. — the specifically relevant acceptance is: Backend initialization succeeds without static access keys embedded in .terraform or saved plan artifacts. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. There the relevant acceptance is: The reviewed plan explains which observed remote attributes differ from desired HCL. For the question's actual requirement — A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. — the specifically relevant acceptance is: Backend initialization succeeds without static access keys embedded in .terraform or saved plan artifacts. It would therefore not resolve or assess the case as stated.

Question 448

Consider a proposed solution for this requirement: A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. The team plans to do the following: Use supported environment-based backend credentials or identity rather than embedding credentials in backend configuration. Which limitation or operational caveat must remain in the review?

  1. If configuration still declares the object, a normal later plan may attempt to create it again.
  2. Not every remote change is actionable drift; provider-computed attributes and intentional shared ownership need consideration.
  3. Locking support depends on backend type; disabling locks invites state corruption.
  4. Backend configuration data can be captured in local initialization metadata and plan files.

Explanation

Correct Answer

D:

The limitation is backend configuration data can be captured in local initialization metadata and plan files. The proposed change is use supported environment-based backend credentials or identity rather than embedding credentials in backend configuration. Validate it by checking backend initialization succeeds without static access keys embedded in .terraform or saved plan artifacts. State backends need their own secure authentication channel; configuration literals are not automatically secret-safe.

Incorrect Answers

A:

This is linked to a different situation: A managed object should stop being controlled by Terraform while remaining physically available. There the relevant limitation is: If configuration still declares the object, a normal later plan may attempt to create it again. For the question's actual requirement — A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. — the specifically relevant limitation is: Backend configuration data can be captured in local initialization metadata and plan files. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. There the relevant limitation is: Not every remote change is actionable drift; provider-computed attributes and intentional shared ownership need consideration. For the question's actual requirement — A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. — the specifically relevant limitation is: Backend configuration data can be captured in local initialization metadata and plan files. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: Two release pipelines try to update the same remote state simultaneously and one sees a lock-acquisition failure. There the relevant limitation is: Locking support depends on backend type; disabling locks invites state corruption. For the question's actual requirement — A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. — the specifically relevant limitation is: Backend configuration data can be captured in local initialization metadata and plan files. It would therefore not resolve or assess the case as stated.

Question 449

The team is reviewing a Terraform implementation for this case: A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Assume command-line -backend-config secrets are never preserved after initialization.
  2. Keep separate laptop-local states and manually merge their JSON content after each apply.
  3. Commit .terraform/ to guarantee reproducibility and treat the directory as harmless source code.
  4. Run a normal apply and assume it only refreshes state while never changing infrastructure.

Explanation

Correct Answer

A:

Reject the assumption: Assume command-line -backend-config secrets are never preserved after initialization. Instead, use supported environment-based backend credentials or identity rather than embedding credentials in backend configuration. State backends need their own secure authentication channel; configuration literals are not automatically secret-safe. Acceptance evidence: Backend initialization succeeds without static access keys embedded in .terraform or saved plan artifacts.

Incorrect Answers

B:

This is linked to a different situation: A team's state file is stored on a laptop and must be shared across several engineers without copying it manually after every change. There the relevant misconception is: Keep separate laptop-local states and manually merge their JSON content after each apply. For the question's actual requirement — A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. — the specifically relevant misconception is: Assume command-line -backend-config secrets are never preserved after initialization. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: An engineer wants to commit the local .terraform directory to source control because it contains provider caches and backend settings. There the relevant misconception is: Commit .terraform/ to guarantee reproducibility and treat the directory as harmless source code. For the question's actual requirement — A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. — the specifically relevant misconception is: Assume command-line -backend-config secrets are never preserved after initialization. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A company intentionally altered remote settings and wants Terraform state to reflect the real objects without proposing configuration-driven remediation yet. There the relevant misconception is: Run a normal apply and assume it only refreshes state while never changing infrastructure. For the question's actual requirement — A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. — the specifically relevant misconception is: Assume command-line -backend-config secrets are never preserved after initialization. It would therefore not resolve or assess the case as stated.

Question 450

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. and Workstream B: A service module declares use of a third-party provider but two different namespaces publish plugins with the same local name. and Workstream C: A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. Select exactly 3 actions, one addressing each distinct workstream.

  1. Use supported environment-based backend credentials or identity rather than embedding credentials in backend configuration.
  2. Inspect terraform plan -replace=ADDRESS and review any downstream dependencies before applying.
  3. Use terraform state show ADDRESS or a carefully scoped terraform show output on the selected state.
  4. Specify the provider's full registry source address under terraform.required_providers.
  5. Pass values through appropriate .tfvars files or documented TF_VAR_name environment variables.
  6. Configure the workspace's VCS connection, working directory, and run triggers for the intended branch.

Explanation

Correct Answers

A:

For the workstream in which a security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files, use this action: Use supported environment-based backend credentials or identity rather than embedding credentials in backend configuration. State backends need their own secure authentication channel; configuration literals are not automatically secret-safe. Verify: Backend initialization succeeds without static access keys embedded in .terraform or saved plan artifacts. Limitation: Backend configuration data can be captured in local initialization metadata and plan files.

D:

For the workstream in which a service module declares use of a third-party provider but two different namespaces publish plugins with the same local name, use this action: Specify the provider's full registry source address under terraform.required_providers. Source addresses disambiguate providers that share local names. Verify: The lock entry identifies the intended registry namespace, provider type, and selected version. Limitation: Provider local names in HCL do not by themselves prove the external publisher namespace.

E:

For the workstream in which a deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL, use this action: Pass values through appropriate .tfvars files or documented TF_VAR_name environment variables. Terraform evaluates input values separately from the module's reusable declarations. Verify: The plan uses the expected values while the shared module source remains unchanged. Limitation: Precedence between inputs must be understood and secret values still need secure sourcing.

Incorrect Answers

B:

This action is appropriate instead for a different, unlisted requirement: A deployment operator needs to replace a single degraded instance deliberately while keeping its resource address. It would be checked by: The proposed plan marks that particular resource instance for replacement. 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: An analyst needs to inspect one managed resource's recorded attributes and associated provider metadata during an incident. It would be checked by: The selected resource's stored attributes and address are visible for diagnosis. 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 development team connects one infrastructure repository to an HCP Terraform workspace and expects reviewed commits to trigger plans. It would be checked by: A relevant commit produces a workspace run and pull requests can show speculative plans if configured. 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.