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 41

Question 400

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A team uses a module from the public registry and needs to prevent unreviewed minor changes after a security assessment. and Workstream B: A team is migrating existing local state into HCP Terraform and wants to avoid accidental duplicate resource creation. and Workstream C: A newly created project uses both a Kubernetes cluster and cloud DNS records, and the same release should manage them coherently. Select exactly 3 actions, one addressing each distinct workstream.

  1. Declare separate supported Kubernetes and DNS providers and use their respective resource types in the same root module.
  2. Specify a reviewed registry-module version constraint in the module block.
  3. Manage lifecycle through an explicit resource binding only if ownership is intended; a data source alone cannot delete the looked-up zone.
  4. Configure an appropriate supported remote backend with secure access and locking rather than emailing terraform.tfstate.
  5. Run terraform fmt -check for CI verification and terraform fmt to rewrite HCL formatting when authorized.
  6. Back up state, configure HCP cloud integration, and follow the prompted state migration during initialization.

Explanation

Correct Answers

A:

For the workstream in which a newly created project uses both a Kubernetes cluster and cloud DNS records, and the same release should manage them coherently, use this action: Declare separate supported Kubernetes and DNS providers and use their respective resource types in the same root module. Terraform can orchestrate multiple service APIs by loading an appropriate provider for each distinct resource type. Verify: The plan shows objects from both provider schemas and does not misroute requests across APIs. Limitation: The existence of a provider does not prove its API endpoints or credentials are reachable in every environment.

B:

For the workstream in which a team uses a module from the public registry and needs to prevent unreviewed minor changes after a security assessment, use this action: Specify a reviewed registry-module version constraint in the module block. Registry module versions can be constrained explicitly in module calls. Verify: Initialization selects a module release satisfying the stated registry version requirement. Limitation: Registry-module versions are separate from provider lock-file selections and Terraform CLI versions.

F:

For the workstream in which a team is migrating existing local state into HCP Terraform and wants to avoid accidental duplicate resource creation, use this action: Back up state, configure HCP cloud integration, and follow the prompted state migration during initialization. State migration preserves the mapping between configuration addresses and existing objects. Verify: The HCP workspace contains the existing managed addresses after migration and normal plan does not re-create all resources. Limitation: Migration needs destination permissions, correct workspace identity, and validation of resulting state.

Incorrect Answers

C:

This action is appropriate instead for a different, unlisted requirement: An engineer sees a data block representing a preexisting DNS zone and wants to delete that DNS zone with terraform destroy. It would be checked by: Destroy plans do not include deleting an object solely because a data block queried it. 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 team's state file is stored on a laptop and must be shared across several engineers without copying it manually after every change. It would be checked by: Multiple team members read one central state snapshot and serialized operations when the backend supports locking. 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 pull request has inconsistent indentation and alignment, but the team does not want to provision any resources. It would be checked by: The formatting check succeeds on canonical HCL layout without cloud API changes. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

Question 401

An infrastructure team faces this specific situation: A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. Which Terraform action most directly satisfies the requirement?

  1. Treat each module call as a distinct instance with its own passed inputs and resource addresses.
  2. Use a module block whose source specifies the documented Terraform Registry namespace, name, and provider.
  3. Review the intended registry release and run terraform init -upgrade after updating constraints as needed.
  4. Use for_each on the module block and reference module.stack["test"].endpoint.

Explanation

Correct Answer

C:

Review the intended registry release and run terraform init -upgrade after updating constraints as needed. Module upgrade changes downloaded code, not state ownership by itself. Verify: The initialized module source matches the new permitted version and the resulting plan is reviewed. Limitation: An upgrade may change resources and output interfaces; it needs an impact review before apply.

Incorrect Answers

A:

This is linked to a different situation: Two module instances share the same source but have different input maps, and an engineer expects identical endpoint addresses. There the relevant decision is: Treat each module call as a distinct instance with its own passed inputs and resource addresses. For the question's actual requirement — A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. — the specifically relevant decision is: Review the intended registry release and run terraform init -upgrade after updating constraints as needed. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A shared platform module is stored in the Terraform public registry and teams need to invoke it without copying the repository contents. There the relevant decision is: Use a module block whose source specifies the documented Terraform Registry namespace, name, and provider. For the question's actual requirement — A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. — the specifically relevant decision is: Review the intended registry release and run terraform init -upgrade after updating constraints as needed. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A module is instantiated for each environment in a map, and the root needs the output for the test environment. There the relevant decision is: Use for_each on the module block and reference module.stack["test"].endpoint. For the question's actual requirement — A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. — the specifically relevant decision is: Review the intended registry release and run terraform init -upgrade after updating constraints as needed. It would therefore not resolve or assess the case as stated.

Question 402

A reviewer is confirming a change for the following use case: A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. The implementation follows this approach: Review the intended registry release and run terraform init -upgrade after updating constraints as needed. Which observation or acceptance test most directly verifies the intended result?

  1. The keyed module instance exposes only the test environment's selected output.
  2. The initialized module source matches the new permitted version and the resulting plan is reviewed.
  3. Planning resolves the child's environment value from the explicit module call.
  4. Terraform reads the local child module without fetching it from a remote registry.

Explanation

Correct Answer

B:

Acceptance evidence: The initialized module source matches the new permitted version and the resulting plan is reviewed. It validates the proposed action, review the intended registry release and run terraform init -upgrade after updating constraints as needed, because module upgrade changes downloaded code, not state ownership by itself. Remaining limitation: An upgrade may change resources and output interfaces; it needs an impact review before apply.

Incorrect Answers

A:

This is linked to a different situation: A module is instantiated for each environment in a map, and the root needs the output for the test environment. There the relevant acceptance is: The keyed module instance exposes only the test environment's selected output. For the question's actual requirement — A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. — the specifically relevant acceptance is: The initialized module source matches the new permitted version and the resulting plan is reviewed. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. There the relevant acceptance is: Planning resolves the child's environment value from the explicit module call. For the question's actual requirement — A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. — the specifically relevant acceptance is: The initialized module source matches the new permitted version and the resulting plan is reviewed. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A security group module lives in the local modules/security directory of the same versioned repository. There the relevant acceptance is: Terraform reads the local child module without fetching it from a remote registry. For the question's actual requirement — A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. — the specifically relevant acceptance is: The initialized module source matches the new permitted version and the resulting plan is reviewed. It would therefore not resolve or assess the case as stated.

Question 403

Consider a proposed solution for this requirement: A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. The team plans to do the following: Review the intended registry release and run terraform init -upgrade after updating constraints as needed. Which limitation or operational caveat must remain in the review?

  1. Changing count or order can affect addresses and cause unintended replacements.
  2. Git source refs and the registry module version argument are different mechanisms.
  3. An upgrade may change resources and output interfaces; it needs an impact review before apply.
  4. Input variables are scoped to each module and do not implicitly leak across module boundaries.

Explanation

Correct Answer

C:

The limitation is an upgrade may change resources and output interfaces; it needs an impact review before apply. The proposed change is review the intended registry release and run terraform init -upgrade after updating constraints as needed. Validate it by checking the initialized module source matches the new permitted version and the resulting plan is reviewed. Module upgrade changes downloaded code, not state ownership by itself.

Incorrect Answers

A:

This is linked to a different situation: A deployment calls a reusable module with count = 3 and must reference the output of only the second instance. There the relevant limitation is: Changing count or order can affect addresses and cause unintended replacements. For the question's actual requirement — A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. — the specifically relevant limitation is: An upgrade may change resources and output interfaces; it needs an impact review before apply. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. There the relevant limitation is: Git source refs and the registry module version argument are different mechanisms. For the question's actual requirement — A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. — the specifically relevant limitation is: An upgrade may change resources and output interfaces; it needs an impact review before apply. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. There the relevant limitation is: Input variables are scoped to each module and do not implicitly leak across module boundaries. For the question's actual requirement — A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. — the specifically relevant limitation is: An upgrade may change resources and output interfaces; it needs an impact review before apply. It would therefore not resolve or assess the case as stated.

Question 404

The team is reviewing a Terraform implementation for this case: A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Reference module.app.local.database_hostname as though a child's locals were public attributes.
  2. Assume Terraform automatically searches every nested folder in a Git repository for a matching module name.
  3. Index a for_each module by an arbitrary numeric order instead of its stable key.
  4. Delete the Terraform state to force the new module to be installed.

Explanation

Correct Answer

D:

Reject the assumption: Delete the Terraform state to force the new module to be installed. Instead, review the intended registry release and run terraform init -upgrade after updating constraints as needed. Module upgrade changes downloaded code, not state ownership by itself. Acceptance evidence: The initialized module source matches the new permitted version and the resulting plan is reviewed.

Incorrect Answers

A:

This is linked to a different situation: A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. There the relevant misconception is: Reference module.app.local.database_hostname as though a child's locals were public attributes. For the question's actual requirement — A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. — the specifically relevant misconception is: Delete the Terraform state to force the new module to be installed. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. There the relevant misconception is: Assume Terraform automatically searches every nested folder in a Git repository for a matching module name. For the question's actual requirement — A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. — the specifically relevant misconception is: Delete the Terraform state to force the new module to be installed. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A module is instantiated for each environment in a map, and the root needs the output for the test environment. There the relevant misconception is: Index a for_each module by an arbitrary numeric order instead of its stable key. For the question's actual requirement — A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. — the specifically relevant misconception is: Delete the Terraform state to force the new module to be installed. It would therefore not resolve or assess the case as stated.

Question 405

A Terraform platform team is coordinating 2 independent decisions. Workstream A: A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. and Workstream B: A company wants credential access for runs to be short-lived rather than distributing long-lived cloud keys to every workspace. Select exactly 2 actions, one addressing each distinct workstream.

  1. Let the state lock serialize operations and retry after the active writer finishes.
  2. Set an appropriate TF_LOG level for the troubleshooting session and reproduce the error safely.
  3. Review the intended registry release and run terraform init -upgrade after updating constraints as needed.
  4. Run terraform validate after successful initialization to check syntax and internal configuration consistency.
  5. Use a provider-supported HCP Terraform dynamic credentials integration with appropriately scoped cloud roles.

Explanation

Correct Answers

C:

For the workstream in which a registry module release contains an urgent fix and the team's installed module is still the previous compatible release, use this action: Review the intended registry release and run terraform init -upgrade after updating constraints as needed. Module upgrade changes downloaded code, not state ownership by itself. Verify: The initialized module source matches the new permitted version and the resulting plan is reviewed. Limitation: An upgrade may change resources and output interfaces; it needs an impact review before apply.

E:

For the workstream in which a company wants credential access for runs to be short-lived rather than distributing long-lived cloud keys to every workspace, use this action: Use a provider-supported HCP Terraform dynamic credentials integration with appropriately scoped cloud roles. Dynamic credentials use trust exchange to limit credential lifetime and distribution. Verify: A controlled run obtains temporary credentials and succeeds without storing static long-lived keys in workspace variables. Limitation: The identity provider trust configuration and cloud permissions must be correctly scoped and tested.

Incorrect Answers

A:

This option addresses a separate requirement: Two release pipelines try to update the same remote state simultaneously and one sees a lock-acquisition failure. Evidence for that other requirement would be only one run modifies the protected state at a time and the second safely waits or fails; neither listed workstream asks for it.

B:

This option addresses a separate requirement: A provider operation fails with an opaque authentication error and an engineer needs temporary, more detailed Terraform diagnostics. Evidence for that other requirement would be terraform emits relevant diagnostic details to stderr while the log setting is enabled; neither listed workstream asks for it.

D:

This option addresses a separate requirement: A developer adds a missing required argument to a resource definition and needs a fast validation before planning. Evidence for that other requirement would be the validate command reports whether the configuration passes Terraform's static checks; neither listed workstream asks for it.

Question 406

An infrastructure team faces this specific situation: A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. Which Terraform action most directly satisfies the requirement?

  1. Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials.
  2. Choose an explicit Git ref in the source URL rather than the registry-specific module version argument.
  3. Use a module block whose source specifies the documented Terraform Registry namespace, name, and provider.
  4. Reference the local path with source = "./modules/security" inside the module block.

Explanation

Correct Answer

B:

Choose an explicit Git ref in the source URL rather than the registry-specific module version argument. VCS source selection is controlled by Git ref, whereas registry sources support module version constraints. Verify: Terraform downloads the module code at the intended Git tag or commit during init. Limitation: A moving branch ref does not provide the same immutability as a reviewed commit SHA.

Incorrect Answers

A:

This is linked to a different situation: An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. There the relevant decision is: Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials. For the question's actual requirement — A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. — the specifically relevant decision is: Choose an explicit Git ref in the source URL rather than the registry-specific module version argument. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A shared platform module is stored in the Terraform public registry and teams need to invoke it without copying the repository contents. There the relevant decision is: Use a module block whose source specifies the documented Terraform Registry namespace, name, and provider. For the question's actual requirement — A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. — the specifically relevant decision is: Choose an explicit Git ref in the source URL rather than the registry-specific module version argument. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A security group module lives in the local modules/security directory of the same versioned repository. There the relevant decision is: Reference the local path with source = "./modules/security" inside the module block. For the question's actual requirement — A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. — the specifically relevant decision is: Choose an explicit Git ref in the source URL rather than the registry-specific module version argument. It would therefore not resolve or assess the case as stated.

Question 407

A reviewer is confirming a change for the following use case: A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. The implementation follows this approach: Choose an explicit Git ref in the source URL rather than the registry-specific module version argument. Which observation or acceptance test most directly verifies the intended result?

  1. Terraform downloads the module code at the intended Git tag or commit during init.
  2. Initialization loads only the intended child configuration rooted at the named subdirectory.
  3. Initialization checks out the intended Git module revision and the plan uses its configuration.
  4. The child's plan uses the two exact provider instances rather than silently defaulting to one region.

Explanation

Correct Answer

A:

Acceptance evidence: Terraform downloads the module code at the intended Git tag or commit during init. It validates the proposed action, choose an explicit Git ref in the source URL rather than the registry-specific module version argument, because vCS source selection is controlled by Git ref, whereas registry sources support module version constraints. Remaining limitation: A moving branch ref does not provide the same immutability as a reviewed commit SHA.

Incorrect Answers

B:

This is linked to a different situation: A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. There the relevant acceptance is: Initialization loads only the intended child configuration rooted at the named subdirectory. For the question's actual requirement — A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. — the specifically relevant acceptance is: Terraform downloads the module code at the intended Git tag or commit during init. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. There the relevant acceptance is: Initialization checks out the intended Git module revision and the plan uses its configuration. For the question's actual requirement — A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. — the specifically relevant acceptance is: Terraform downloads the module code at the intended Git tag or commit during init. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A child module must receive two non-default provider aliases for cross-region VPN creation. There the relevant acceptance is: The child's plan uses the two exact provider instances rather than silently defaulting to one region. For the question's actual requirement — A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. — the specifically relevant acceptance is: Terraform downloads the module code at the intended Git tag or commit during init. It would therefore not resolve or assess the case as stated.

Question 408

Consider a proposed solution for this requirement: A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. The team plans to do the following: Choose an explicit Git ref in the source URL rather than the registry-specific module version argument. Which limitation or operational caveat must remain in the review?

  1. Renaming the test key is an address change unless state moves are handled.
  2. A moving branch ref does not provide the same immutability as a reviewed commit SHA.
  3. Module source selection does not configure credentials or automatically choose a safe release version.
  4. The repository must remain accessible, and the subdirectory must actually contain valid Terraform module files.

Explanation

Correct Answer

B:

The limitation is a moving branch ref does not provide the same immutability as a reviewed commit SHA. The proposed change is choose an explicit Git ref in the source URL rather than the registry-specific module version argument. Validate it by checking terraform downloads the module code at the intended Git tag or commit during init. VCS source selection is controlled by Git ref, whereas registry sources support module version constraints.

Incorrect Answers

A:

This is linked to a different situation: A module is instantiated for each environment in a map, and the root needs the output for the test environment. There the relevant limitation is: Renaming the test key is an address change unless state moves are handled. For the question's actual requirement — A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. — the specifically relevant limitation is: A moving branch ref does not provide the same immutability as a reviewed commit SHA. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A shared platform module is stored in the Terraform public registry and teams need to invoke it without copying the repository contents. There the relevant limitation is: Module source selection does not configure credentials or automatically choose a safe release version. For the question's actual requirement — A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. — the specifically relevant limitation is: A moving branch ref does not provide the same immutability as a reviewed commit SHA. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. There the relevant limitation is: The repository must remain accessible, and the subdirectory must actually contain valid Terraform module files. For the question's actual requirement — A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. — the specifically relevant limitation is: A moving branch ref does not provide the same immutability as a reviewed commit SHA. It would therefore not resolve or assess the case as stated.

Question 409

The team is reviewing a Terraform implementation for this case: A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Expect Terraform's registry version solver to interpret a version argument for all Git sources.
  2. Reference module.app.local.database_hostname as though a child's locals were public attributes.
  3. Assume Terraform automatically searches every nested folder in a Git repository for a matching module name.
  4. Set version = "1.2.0" on a local-path module and expect Terraform Registry version selection.

Explanation

Correct Answer

A:

Reject the assumption: Expect Terraform's registry version solver to interpret a version argument for all Git sources. Instead, choose an explicit Git ref in the source URL rather than the registry-specific module version argument. VCS source selection is controlled by Git ref, whereas registry sources support module version constraints. Acceptance evidence: Terraform downloads the module code at the intended Git tag or commit during init.

Incorrect Answers

B:

This is linked to a different situation: A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. There the relevant misconception is: Reference module.app.local.database_hostname as though a child's locals were public attributes. For the question's actual requirement — A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. — the specifically relevant misconception is: Expect Terraform's registry version solver to interpret a version argument for all Git sources. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. There the relevant misconception is: Assume Terraform automatically searches every nested folder in a Git repository for a matching module name. For the question's actual requirement — A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. — the specifically relevant misconception is: Expect Terraform's registry version solver to interpret a version argument for all Git sources. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A security group module lives in the local modules/security directory of the same versioned repository. There the relevant misconception is: Set version = "1.2.0" on a local-path module and expect Terraform Registry version selection. For the question's actual requirement — A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. — the specifically relevant misconception is: Expect Terraform's registry version solver to interpret a version argument for all Git sources. It would therefore not resolve or assess the case as stated.

Question 410

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. and Workstream B: A university repeats a six-network, three-environment build by copying screenshots of console clicks, and auditors cannot reconstruct which settings produced the last deployment. and Workstream C: A web team must create a new load balancer and also look up an existing shared network ID managed by another team. Select exactly 3 actions, one addressing each distinct workstream.

  1. Describe the desired networks and dependencies in versioned Terraform configuration and review plans before applying.
  2. Declare a managed resource for the new load balancer and an appropriate data source for the existing network lookup.
  3. Choose an explicit Git ref in the source URL rather than the registry-specific module version argument.
  4. Keep one authoritative managed address per remote object and refactor references accordingly.
  5. Publish and consume approved modules through an HCP Terraform private module registry with reviewed versions.
  6. Configure separate HCP workspaces with correct working directories and path-based VCS run triggers.

Explanation

Correct Answers

A:

For the workstream in which a university repeats a six-network, three-environment build by copying screenshots of console clicks, and auditors cannot reconstruct which settings produced the last deployment, use this action: Describe the desired networks and dependencies in versioned Terraform configuration and review plans before applying. IaC represents desired resources in reviewable code, making configuration changes explicit rather than relying on a person's console memory. Verify: A fresh environment can be planned from the same versioned configuration and its intended change set reviewed. Limitation: Provider APIs and credentials are still required; merely storing HCL does not make the environment provision itself.

B:

For the workstream in which a web team must create a new load balancer and also look up an existing shared network ID managed by another team, use this action: Declare a managed resource for the new load balancer and an appropriate data source for the existing network lookup. Resource blocks manage lifecycle; data blocks query information without taking lifecycle ownership of the queried object. Verify: Plan distinguishes a create action from a read-only query of the existing network. Limitation: The data source requires access and will fail if its lookup criteria match no suitable object.

C:

For the workstream in which a private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source, use this action: Choose an explicit Git ref in the source URL rather than the registry-specific module version argument. VCS source selection is controlled by Git ref, whereas registry sources support module version constraints. Verify: Terraform downloads the module code at the intended Git tag or commit during init. Limitation: A moving branch ref does not provide the same immutability as a reviewed commit SHA.

Incorrect Answers

D:

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.

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.

F:

This action is appropriate instead for a different, unlisted requirement: A company uses one VCS monorepo for several independent Terraform root directories and wants each to run only when relevant files change. It would be checked by: Changing one directory triggers its intended workspace without spurious unrelated runs. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

HashiCorp Certified: Terraform Associate (004) (Terraform Associate 004) Practice Tests

UP

SPECIAL OFFER: GET 10% OFF

This is ONE TIME OFFER

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

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

Download Free Demo of VCE Exam Simulator

Experience Avanset VCE Exam Simulator for yourself.

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

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