Practice Exams:

HashiCorp Terraform Associate 004 Dumps

EXAM: HashiCorp Certified: Terraform Associate (004)
Verified By Experts
Premium Bundle
$40.00
$59.97 $99.97

Terraform Associate 004 Premium Bundle


  • Premium File 167 Questions & Answers
  • Training Course 118 Lectures
  • Study Guide 285 Pages

HashiCorp Terraform Associate 004 Practice Test 45

Question 440

A healthcare application obtains short-lived Vault credentials during Terraform execution and must pass them only into supported ephemeral contexts. Which combined implementation and verification plan is the best match for this workload?

  1. Implement: Use an ephemeral variable or resource with a supported provider write-only argument, and manage any companion version attribute when rotating secrets. Verify: Run a disposable rotation using a documented write-only argument, inspect artifacts for omitted secret text and confirm the version attribute triggers the expected update.
  2. Implement: Add explicit depends_on on a resource or module only when the downstream operation relies on an upstream side effect not represented by a direct attribute reference. Verify: Create a test dependency without a data reference, inspect graph ordering, and remove the explicit dependency to show why a direct reference would be preferable when possible.
  3. Implement: Use an ephemeral variable or resource with a supported provider write-only argument, and manage any companion version attribute when rotating secrets. Verify: Apply a disposable nonproduction secret-shaped value, inspect state access policies and confirm no secret is printed in ordinary plan text.
  4. Implement: Mark confidential input variables sensitive, avoid displaying them in outputs, and separately protect state, plan files and credential injection paths. Verify: Run a disposable rotation using a documented write-only argument, inspect artifacts for omitted secret text and confirm the version attribute triggers the expected update.

Answer & Explanations

Correct answer: A

A.

The question is set in this situation: A healthcare application obtains short-lived Vault credentials during Terraform execution and must pass them only into supported ephemeral contexts. Use an ephemeral variable or resource with a supported provider write-only argument, and manage any companion version attribute when rotating secrets. Confirm it through this test: Run a disposable rotation using a documented write-only argument, inspect artifacts for omitted secret text and confirm the version attribute triggers the expected update. Ephemeral values and write-only arguments can avoid storing the temporary secret in Terraform plan and state, unlike sensitive flags alone; providers must support them.

B.

This action/test pair addresses “Use depends_on only for otherwise hidden dependencies”. Add explicit depends_on on a resource or module only when the downstream operation relies on an upstream side effect not represented by a direct attribute reference. Create a test dependency without a data reference, inspect graph ordering, and remove the explicit dependency to show why a direct reference would be preferable when possible. The case instead calls for: Use an ephemeral variable or resource with a supported provider write-only argument, and manage any companion version attribute when rotating secrets.

C.

The question is set in this situation: A healthcare application obtains short-lived Vault credentials during Terraform execution and must pass them only into supported ephemeral contexts. The action is applicable: Use an ephemeral variable or resource with a supported provider write-only argument, and manage any companion version attribute when rotating secrets. But its proposed test—Apply a disposable nonproduction secret-shaped value, inspect state access policies and confirm no secret is printed in ordinary plan text.—addresses “Treat sensitive flags as display masking rather than zero-persistence”. This requirement is confirmed instead by: Run a disposable rotation using a documented write-only argument, inspect artifacts for omitted secret text and confirm the version attribute triggers the expected update.

D.

The question is set in this situation: A healthcare application obtains short-lived Vault credentials during Terraform execution and must pass them only into supported ephemeral contexts. The test would be relevant: Run a disposable rotation using a documented write-only argument, inspect artifacts for omitted secret text and confirm the version attribute triggers the expected update. But the offered implementation—Mark confidential input variables sensitive, avoid displaying them in outputs, and separately protect state, plan files and credential injection paths.—addresses “Treat sensitive flags as display masking rather than zero-persistence”. The action needed here is: Use an ephemeral variable or resource with a supported provider write-only argument, and manage any companion version attribute when rotating secrets.

Question 441

A startup maintains one internal test-network module under modules/network and wants multiple application environments to reuse it. Which HashiCorp Terraform infrastructure implementation best satisfies this requirement?

  1. Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.
  2. Call a network module and an application module from one root configuration, connecting only declared outputs to the dependent module's inputs.
  3. Select a published module source from the correct Terraform Registry namespace and supply a compatible, reviewed module version in the module block.
  4. Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

Answer & Explanations

Correct answer: A

A.

Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration. A child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically. Verify the result with this test: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.

B.

Call a network module and an application module from one root configuration, connecting only declared outputs to the dependent module's inputs. This addresses “Compose multiple modules through explicit input and output interfaces”, where the governing principle is: Cross-module expressions create Terraform dependency edges while preserving reusable, separately testable module implementations and clear ownership. The stated case instead calls for: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

C.

Select a published module source from the correct Terraform Registry namespace and supply a compatible, reviewed module version in the module block. This addresses “Use Terraform Registry module sources with intentional version selection”, where the governing principle is: Registry sources resolve reusable module packages separately from provider plugins, and a module version controls the downloaded configuration interface. The stated case instead calls for: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

D.

Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip. This addresses “Freeze non-Registry module source at a known Git revision”, where the governing principle is: Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference. The stated case instead calls for: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

Question 442

A startup maintains one internal test-network module under modules/network and wants multiple application environments to reuse it. The infrastructure engineer proposes this change: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration. Which mechanism explains why it works?

  1. Cross-module expressions create Terraform dependency edges while preserving reusable, separately testable module implementations and clear ownership.
  2. Registry sources resolve reusable module packages separately from provider plugins, and a module version controls the downloaded configuration interface.
  3. A child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically.
  4. Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference.

Answer & Explanations

Correct answer: C

A.

Cross-module expressions create Terraform dependency edges while preserving reusable, separately testable module implementations and clear ownership. That explains “Compose multiple modules through explicit input and output interfaces”, not the mechanism behind the described change. The relevant principle is: A child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically.

B.

Registry sources resolve reusable module packages separately from provider plugins, and a module version controls the downloaded configuration interface. That explains “Use Terraform Registry module sources with intentional version selection”, not the mechanism behind the described change. The relevant principle is: A child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically.

C.

A child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically. The corresponding implementation is: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

D.

Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference. That explains “Freeze non-Registry module source at a known Git revision”, not the mechanism behind the described change. The relevant principle is: A child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically.

Question 443

A startup maintains one internal test-network module under modules/network and wants multiple application environments to reuse it. After implementing this change—Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.—which test most directly validates its intended outcome?

  1. Initialize a disposable registry module at a pinned version and confirm source, input requirements and downloaded module path before planning changes.
  2. Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.
  3. Plan a disposable network-plus-app stack, inspect the dependency graph and confirm an app's input references the selected network output.
  4. Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.

Answer & Explanations

Correct answer: D

A.

Initialize a disposable registry module at a pinned version and confirm source, input requirements and downloaded module path before planning changes. That would help test “Use Terraform Registry module sources with intentional version selection”, not the outcome required in this scenario. The relevant acceptance check is: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.

B.

Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch. That would help test “Freeze non-Registry module source at a known Git revision”, not the outcome required in this scenario. The relevant acceptance check is: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.

C.

Plan a disposable network-plus-app stack, inspect the dependency graph and confirm an app's input references the selected network output. That would help test “Compose multiple modules through explicit input and output interfaces”, not the outcome required in this scenario. The relevant acceptance check is: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.

D.

Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name. This check is decisive because a child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically.

Question 444

A startup maintains one internal test-network module under modules/network and wants multiple application environments to reuse it. Which proposed shortcut most directly risks divergent repeated infrastructure definitions with no clear module boundary and should therefore be rejected?

  1. Hardcode a cloud subnet ID inside an application module while claiming it automatically follows replacements performed by a separate networking module.
  2. Copy the module's resource blocks into every caller manually and assume the duplicated copies share a single versioned interface.
  3. Select an unknown third-party registry module at an unreviewed latest release and apply its resources in a sensitive account immediately.
  4. Point production at the main branch of a remote module repository and assume each CI runner executes identical unchanged code forever.

Answer & Explanations

Correct answer: B

A.

Hardcode a cloud subnet ID inside an application module while claiming it automatically follows replacements performed by a separate networking module. That shortcut risks broken application connectivity after network replacement or environment migration. Here the specific shortcut is: Copy the module's resource blocks into every caller manually and assume the duplicated copies share a single versioned interface.

B.

Copy the module's resource blocks into every caller manually and assume the duplicated copies share a single versioned interface. The foreseeable failure is divergent repeated infrastructure definitions with no clear module boundary. The safer response is: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

C.

Select an unknown third-party registry module at an unreviewed latest release and apply its resources in a sensitive account immediately. That shortcut risks unexpected infrastructure changes or untrusted code entering a shared deployment. Here the specific shortcut is: Copy the module's resource blocks into every caller manually and assume the duplicated copies share a single versioned interface.

D.

Point production at the main branch of a remote module repository and assume each CI runner executes identical unchanged code forever. That shortcut risks unreviewed remote module changes entering production infrastructure plans. Here the specific shortcut is: Copy the module's resource blocks into every caller manually and assume the duplicated copies share a single versioned interface.

Question 445

A startup maintains one internal test-network module under modules/network and wants multiple application environments to reuse it. Which combined implementation and verification plan is the best match for this workload?

  1. Implement: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration. Verify: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.
  2. Implement: Call a network module and an application module from one root configuration, connecting only declared outputs to the dependent module's inputs. Verify: Plan a disposable network-plus-app stack, inspect the dependency graph and confirm an app's input references the selected network output.
  3. Implement: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration. Verify: Initialize a disposable registry module at a pinned version and confirm source, input requirements and downloaded module path before planning changes.
  4. Implement: Select a published module source from the correct Terraform Registry namespace and supply a compatible, reviewed module version in the module block. Verify: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.

Answer & Explanations

Correct answer: A

A.

Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration. Confirm it through this test: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name. A child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically.

B.

This action/test pair addresses “Compose multiple modules through explicit input and output interfaces”. Call a network module and an application module from one root configuration, connecting only declared outputs to the dependent module's inputs. Plan a disposable network-plus-app stack, inspect the dependency graph and confirm an app's input references the selected network output. The case instead calls for: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

C.

The action is applicable: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration. But its proposed test—Initialize a disposable registry module at a pinned version and confirm source, input requirements and downloaded module path before planning changes.—addresses “Use Terraform Registry module sources with intentional version selection”. This requirement is confirmed instead by: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.

D.

The test would be relevant: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name. But the offered implementation—Select a published module source from the correct Terraform Registry namespace and supply a compatible, reviewed module version in the module block.—addresses “Use Terraform Registry module sources with intentional version selection”. The action needed here is: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

Question 446

A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Which HashiCorp Terraform infrastructure implementation best satisfies this requirement?

  1. Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.
  2. Set a reviewed version constraint for a registry module and upgrade intentionally after inspecting its release notes, interface and plan effects.
  3. Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.
  4. Select a published module source from the correct Terraform Registry namespace and supply a compatible, reviewed module version in the module block.

Answer & Explanations

Correct answer: C

A.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip. This addresses “Freeze non-Registry module source at a known Git revision”, where the governing principle is: Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference. The stated case instead calls for: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

B.

Set a reviewed version constraint for a registry module and upgrade intentionally after inspecting its release notes, interface and plan effects. This addresses “Pin compatible Registry module versions for repeatable changes”, where the governing principle is: Registry module version selection is independent of provider version selection, so a module release can change resources even if the provider lock remains unchanged. The stated case instead calls for: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

C.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration. A child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically. Verify the result with this test: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.

D.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Select a published module source from the correct Terraform Registry namespace and supply a compatible, reviewed module version in the module block. This addresses “Use Terraform Registry module sources with intentional version selection”, where the governing principle is: Registry sources resolve reusable module packages separately from provider plugins, and a module version controls the downloaded configuration interface. The stated case instead calls for: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

Question 447

A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. The infrastructure engineer proposes this change: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration. Which mechanism explains why it works?

  1. Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference.
  2. A child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically.
  3. Registry sources resolve reusable module packages separately from provider plugins, and a module version controls the downloaded configuration interface.
  4. Registry module version selection is independent of provider version selection, so a module release can change resources even if the provider lock remains unchanged.

Answer & Explanations

Correct answer: B

A.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference. That explains “Freeze non-Registry module source at a known Git revision”, not the mechanism behind the described change. The relevant principle is: A child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically.

B.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. A child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically. The corresponding implementation is: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

C.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Registry sources resolve reusable module packages separately from provider plugins, and a module version controls the downloaded configuration interface. That explains “Use Terraform Registry module sources with intentional version selection”, not the mechanism behind the described change. The relevant principle is: A child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically.

D.

Registry module version selection is independent of provider version selection, so a module release can change resources even if the provider lock remains unchanged. That explains “Pin compatible Registry module versions for repeatable changes”, not the mechanism behind the described change. The relevant principle is: A child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically.

Question 448

A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. After implementing this change—Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.—which test most directly validates its intended outcome?

  1. Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.
  2. Initialize a disposable registry module at a pinned version and confirm source, input requirements and downloaded module path before planning changes.
  3. Initialize the same root module at two selected releases, inspect downloaded code and compare plans before authorizing an upgrade.
  4. Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.

Answer & Explanations

Correct answer: D

A.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch. That would help test “Freeze non-Registry module source at a known Git revision”, not the outcome required in this scenario. The relevant acceptance check is: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.

B.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Initialize a disposable registry module at a pinned version and confirm source, input requirements and downloaded module path before planning changes. That would help test “Use Terraform Registry module sources with intentional version selection”, not the outcome required in this scenario. The relevant acceptance check is: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.

C.

Initialize the same root module at two selected releases, inspect downloaded code and compare plans before authorizing an upgrade. That would help test “Pin compatible Registry module versions for repeatable changes”, not the outcome required in this scenario. The relevant acceptance check is: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.

D.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name. This check is decisive because a child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically.

Question 449

A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Which proposed shortcut most directly risks divergent repeated infrastructure definitions with no clear module boundary and should therefore be rejected?

  1. Copy the module's resource blocks into every caller manually and assume the duplicated copies share a single versioned interface.
  2. Select an unknown third-party registry module at an unreviewed latest release and apply its resources in a sensitive account immediately.
  3. Remove the module version argument and assume provider lock-file hashes freeze all module source changes automatically.
  4. Point production at the main branch of a remote module repository and assume each CI runner executes identical unchanged code forever.

Answer & Explanations

Correct answer: A

A.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Copy the module's resource blocks into every caller manually and assume the duplicated copies share a single versioned interface. The foreseeable failure is divergent repeated infrastructure definitions with no clear module boundary. The safer response is: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

B.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Select an unknown third-party registry module at an unreviewed latest release and apply its resources in a sensitive account immediately. That shortcut risks unexpected infrastructure changes or untrusted code entering a shared deployment. Here the specific shortcut is: Copy the module's resource blocks into every caller manually and assume the duplicated copies share a single versioned interface.

C.

Remove the module version argument and assume provider lock-file hashes freeze all module source changes automatically. That shortcut risks unexpected module interface or resource changes after unreviewed dependency updates. Here the specific shortcut is: Copy the module's resource blocks into every caller manually and assume the duplicated copies share a single versioned interface.

D.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Point production at the main branch of a remote module repository and assume each CI runner executes identical unchanged code forever. That shortcut risks unreviewed remote module changes entering production infrastructure plans. Here the specific shortcut is: Copy the module's resource blocks into every caller manually and assume the duplicated copies share a single versioned interface.

Question 450

A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Which combined implementation and verification plan is the best match for this workload?

  1. Implement: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration. Verify: Initialize a disposable registry module at a pinned version and confirm source, input requirements and downloaded module path before planning changes.
  2. Implement: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip. Verify: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.
  3. Implement: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration. Verify: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.
  4. Implement: Select a published module source from the correct Terraform Registry namespace and supply a compatible, reviewed module version in the module block. Verify: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.

Answer & Explanations

Correct answer: C

A.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. The action is applicable: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration. But its proposed test—Initialize a disposable registry module at a pinned version and confirm source, input requirements and downloaded module path before planning changes.—addresses “Use Terraform Registry module sources with intentional version selection”. This requirement is confirmed instead by: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name.

B.

This action/test pair addresses “Freeze non-Registry module source at a known Git revision”. Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip. Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch. The case instead calls for: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

C.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration. Confirm it through this test: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name. A child module groups its own resources and is loaded from the source path during initialization; module blocks do not clone active remote resources automatically.

D.

The question is set in this situation: A university Terraform repository has a teaching module for creating a sandbox subnet and several small root configurations should call it. The test would be relevant: Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name. But the offered implementation—Select a published module source from the correct Terraform Registry namespace and supply a compatible, reviewed module version in the module block.—addresses “Use Terraform Registry module sources with intentional version selection”. The action needed here is: Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

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