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 52

Question 510

A university platform keeps a repeatable infrastructure training baseline across semesters and must pin third-party registry module releases. Which combined implementation and verification plan is the best match for this workload?

  1. Implement: Set a reviewed version constraint for a registry module and upgrade intentionally after inspecting its release notes, interface and plan effects. Verify: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.
  2. Implement: Set a reviewed version constraint for a registry module and upgrade intentionally after inspecting its release notes, interface and plan effects. Verify: Initialize the same root module at two selected releases, inspect downloaded code and compare plans before authorizing an upgrade.
  3. 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 the same root module at two selected releases, inspect downloaded code and compare plans before authorizing an upgrade.
  4. Implement: Use module for_each over known stable environment keys to create independent instances, then address each module output by its map key. Verify: Plan modules keyed by dev and qa, add a staging key and confirm the original module addresses remain stable.

Answer & Explanations

Correct answer: B

A.

The question is set in this situation: A university platform keeps a repeatable infrastructure training baseline across semesters and must pin third-party registry module releases. The action is applicable: Set a reviewed version constraint for a registry module and upgrade intentionally after inspecting its release notes, interface and plan effects. But its proposed test—Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.—addresses “Freeze non-Registry module source at a known Git revision”. This requirement is confirmed instead by: Initialize the same root module at two selected releases, inspect downloaded code and compare plans before authorizing an upgrade.

B.

The question is set in this situation: A university platform keeps a repeatable infrastructure training baseline across semesters and must pin third-party registry module releases. Set a reviewed version constraint for a registry module and upgrade intentionally after inspecting its release notes, interface and plan effects. Confirm it through this test: Initialize the same root module at two selected releases, inspect downloaded code and compare plans before authorizing an upgrade. Registry module version selection is independent of provider version selection, so a module release can change resources even if the provider lock remains unchanged.

C.

The question is set in this situation: A university platform keeps a repeatable infrastructure training baseline across semesters and must pin third-party registry module releases. The test would be relevant: Initialize the same root module at two selected releases, inspect downloaded code and compare plans before authorizing an upgrade. But the offered implementation—Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.—addresses “Freeze non-Registry module source at a known Git revision”. The action needed here is: Set a reviewed version constraint for a registry module and upgrade intentionally after inspecting its release notes, interface and plan effects.

D.

This action/test pair addresses “Instantiate a module repeatedly with stable for_each keys”. Use module for_each over known stable environment keys to create independent instances, then address each module output by its map key. Plan modules keyed by dev and qa, add a staging key and confirm the original module addresses remain stable. The case instead calls for: Set a reviewed version constraint for a registry module and upgrade intentionally after inspecting its release notes, interface and plan effects.

Question 511

A payment processor consumes a Git-hosted shared firewall module and needs deploys to remain stable until the next authorized release. Which HashiCorp Terraform infrastructure implementation best satisfies this requirement?

  1. Define explicit outputs in a child module for resource IDs the caller needs, and reference them as module.<name>.<output> from the root.
  2. Set a reviewed version constraint for a registry module and upgrade intentionally after inspecting its release notes, interface and plan effects.
  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: D

A.

Define explicit outputs in a child module for resource IDs the caller needs, and reference them as module.<name>.<output> from the root. This addresses “Expose child module results through outputs rather than internal assumptions”, where the governing principle is: Module outputs form an intentional interface, while the caller cannot reliably reference arbitrary nested resource attributes without such a contract. The stated case instead calls for: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

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: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

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: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

D.

Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip. Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference. Verify the result with this test: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.

Question 512

A payment processor consumes a Git-hosted shared firewall module and needs deploys to remain stable until the next authorized release. The infrastructure engineer proposes this change: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip. Which mechanism explains why it works?

  1. Registry sources resolve reusable module packages separately from provider plugins, and a module version controls the downloaded configuration interface.
  2. Module outputs form an intentional interface, while the caller cannot reliably reference arbitrary nested resource attributes without such a contract.
  3. Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference.
  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: C

A.

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: Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference.

B.

Module outputs form an intentional interface, while the caller cannot reliably reference arbitrary nested resource attributes without such a contract. That explains “Expose child module results through outputs rather than internal assumptions”, not the mechanism behind the described change. The relevant principle is: Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference.

C.

Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference. The corresponding implementation is: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

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: Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference.

Question 513

A payment processor consumes a Git-hosted shared firewall module and needs deploys to remain stable until the next authorized release. After implementing this change—Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.—which test most directly validates its intended outcome?

  1. Initialize the same root module at two selected releases, inspect downloaded code and compare plans before authorizing an upgrade.
  2. Initialize a disposable registry module at a pinned version and confirm source, input requirements and downloaded module path before planning changes.
  3. Apply a disposable child module, inspect the named output in the caller and confirm a missing output name produces a clear error.
  4. Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.

Answer & Explanations

Correct answer: D

A.

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: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.

B.

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: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.

C.

Apply a disposable child module, inspect the named output in the caller and confirm a missing output name produces a clear error. That would help test “Expose child module results through outputs rather than internal assumptions”, not the outcome required in this scenario. The relevant acceptance check is: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.

D.

Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch. This check is decisive because git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference.

Question 514

A payment processor consumes a Git-hosted shared firewall module and needs deploys to remain stable until the next authorized release. Which proposed shortcut most directly risks unreviewed remote module changes entering production infrastructure plans and should therefore be rejected?

  1. Select an unknown third-party registry module at an unreviewed latest release and apply its resources in a sensitive account immediately.
  2. Point production at the main branch of a remote module repository and assume each CI runner executes identical unchanged code forever.
  3. Remove the module version argument and assume provider lock-file hashes freeze all module source changes automatically.
  4. Refer directly from the root to a resource declared only inside a child module as if its nested address were a root resource name.

Answer & Explanations

Correct answer: B

A.

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: Point production at the main branch of a remote module repository and assume each CI runner executes identical unchanged code forever.

B.

Point production at the main branch of a remote module repository and assume each CI runner executes identical unchanged code forever. The foreseeable failure is unreviewed remote module changes entering production infrastructure plans. The safer response is: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

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: Point production at the main branch of a remote module repository and assume each CI runner executes identical unchanged code forever.

D.

Refer directly from the root to a resource declared only inside a child module as if its nested address were a root resource name. That shortcut risks broken composition and accidental dependence on hidden internal module implementation. Here the specific shortcut is: Point production at the main branch of a remote module repository and assume each CI runner executes identical unchanged code forever.

Question 515

A payment processor consumes a Git-hosted shared firewall module and needs deploys to remain stable until the next authorized release. Which combined implementation and verification plan is the best match for this workload?

  1. 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.
  2. Implement: Set a reviewed version constraint for a registry module and upgrade intentionally after inspecting its release notes, interface and plan effects. 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: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip. Verify: Initialize the same root module at two selected releases, inspect downloaded code and compare plans before authorizing an upgrade.
  4. Implement: Define explicit outputs in a child module for resource IDs the caller needs, and reference them as module.<name>.<output> from the root. Verify: Apply a disposable child module, inspect the named output in the caller and confirm a missing output name produces a clear error.

Answer & Explanations

Correct answer: A

A.

Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip. Confirm it through this test: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch. Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference.

B.

The test would be relevant: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch. But the offered implementation—Set a reviewed version constraint for a registry module and upgrade intentionally after inspecting its release notes, interface and plan effects.—addresses “Pin compatible Registry module versions for repeatable changes”. The action needed here is: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

C.

The action is applicable: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip. But its proposed test—Initialize the same root module at two selected releases, inspect downloaded code and compare plans before authorizing an upgrade.—addresses “Pin compatible Registry module versions for repeatable changes”. This requirement is confirmed instead by: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.

D.

This action/test pair addresses “Expose child module results through outputs rather than internal assumptions”. Define explicit outputs in a child module for resource IDs the caller needs, and reference them as module.<name>.<output> from the root. Apply a disposable child module, inspect the named output in the caller and confirm a missing output name produces a clear error. The case instead calls for: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

Question 516

A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. Which HashiCorp Terraform infrastructure implementation best satisfies this requirement?

  1. Set a reviewed version constraint for a registry module and upgrade intentionally after inspecting its release notes, interface and plan effects.
  2. Declare typed input variables within a child module and provide matching arguments from the root module rather than assuming lexical access to root locals.
  3. Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.
  4. Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration.

Answer & Explanations

Correct answer: C

A.

The question is set in this situation: A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. 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: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

B.

Declare typed input variables within a child module and provide matching arguments from the root module rather than assuming lexical access to root locals. This addresses “Pass values into child module inputs explicitly”, where the governing principle is: Each module has its own variable scope; parent values enter through declared module arguments and do not leak into child blocks by name alone. The stated case instead calls for: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

C.

The question is set in this situation: A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip. Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference. Verify the result with this test: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.

D.

Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration. This addresses “Reference a local child module using an explicit filesystem source”, where the governing 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. The stated case instead calls for: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

Question 517

A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. The infrastructure engineer proposes this change: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip. 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 module version selection is independent of provider version selection, so a module release can change resources even if the provider lock remains unchanged.
  4. Each module has its own variable scope; parent values enter through declared module arguments and do not leak into child blocks by name alone.

Answer & Explanations

Correct answer: A

A.

The question is set in this situation: A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference. The corresponding implementation is: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

B.

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. That explains “Reference a local child module using an explicit filesystem source”, not the mechanism behind the described change. The relevant principle is: Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference.

C.

The question is set in this situation: A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. 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: Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference.

D.

Each module has its own variable scope; parent values enter through declared module arguments and do not leak into child blocks by name alone. That explains “Pass values into child module inputs explicitly”, not the mechanism behind the described change. The relevant principle is: Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference.

Question 518

A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. After implementing this change—Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.—which test most directly validates its intended outcome?

  1. Call a test child module with two different inputs and verify its output changes, then omit one required input and confirm an error occurs.
  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. 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. Initialize the same root module at two selected releases, inspect downloaded code and compare plans before authorizing an upgrade.

Answer & Explanations

Correct answer: B

A.

Call a test child module with two different inputs and verify its output changes, then omit one required input and confirm an error occurs. That would help test “Pass values into child module inputs explicitly”, not the outcome required in this scenario. The relevant acceptance check is: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.

B.

The question is set in this situation: A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch. This check is decisive because git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference.

C.

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

D.

The question is set in this situation: A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. 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: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.

Question 519

A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. Which proposed shortcut most directly risks unreviewed remote module changes entering production infrastructure plans 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. Reference var.region inside a child module merely because the root declares region, with no corresponding child variable declaration.
  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: D

A.

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

B.

Reference var.region inside a child module merely because the root declares region, with no corresponding child variable declaration. That shortcut risks undeclared-input errors or modules silently using incorrect defaults. Here the specific shortcut is: Point production at the main branch of a remote module repository and assume each CI runner executes identical unchanged code forever.

C.

The question is set in this situation: A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. 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: Point production at the main branch of a remote module repository and assume each CI runner executes identical unchanged code forever.

D.

The question is set in this situation: A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. Point production at the main branch of a remote module repository and assume each CI runner executes identical unchanged code forever. The foreseeable failure is unreviewed remote module changes entering production infrastructure plans. The safer response is: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

Question 520

A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. Which combined implementation and verification plan is the best match for this workload?

  1. Implement: Set a reviewed version constraint for a registry module and upgrade intentionally after inspecting its release notes, interface and plan effects. Verify: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.
  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 the same root module at two selected releases, inspect downloaded code and compare plans before authorizing an upgrade.
  3. 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.
  4. 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.

Answer & Explanations

Correct answer: C

A.

The question is set in this situation: A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. The test would be relevant: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch. But the offered implementation—Set a reviewed version constraint for a registry module and upgrade intentionally after inspecting its release notes, interface and plan effects.—addresses “Pin compatible Registry module versions for repeatable changes”. The action needed here is: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

B.

The question is set in this situation: A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. The action is applicable: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip. But its proposed test—Initialize the same root module at two selected releases, inspect downloaded code and compare plans before authorizing an upgrade.—addresses “Pin compatible Registry module versions for repeatable changes”. This requirement is confirmed instead by: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch.

C.

The question is set in this situation: A retail platform reuses an internal Git Terraform module across accounts and wants predictable behavior even when maintainers merge code daily. Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip. Confirm it through this test: Initialize a sandbox with a fixed commit-ref module, verify its source checksum and compare a later version in a separately reviewed branch. Git module sources can follow moving branches unless ref is pinned; Terraform init downloads code from the specified source reference.

D.

This action/test pair addresses “Reference a local child module using an explicit filesystem source”. Declare a module block whose source is a reviewed local relative directory and pass the input values required by that reusable configuration. Run terraform init in a fixture containing a local module, then plan to confirm its resource addresses are prefixed by the module call name. The case instead calls for: Reference an approved version tag or immutable commit reference when using a Git-sourced Terraform module instead of an uncontrolled branch tip.

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