mcAfee Secure Website
23

HashiCorp Terraform Associate 004 Bundle

Exam Code: Terraform Associate 004

Exam Name HashiCorp Certified: Terraform Associate (004)

Certification Provider: HashiCorp

Corresponding Certification: Terraform Associate

Terraform Associate 004 Training Materials $44.99

Reliable & Actual Study Materials for Terraform Associate 004 Exam Success

The Latest Terraform Associate 004 Exam Questions as Experienced in the Actual Test!

  • 24
    Questions & Answers

    Terraform Associate 004 Questions & Answers

    167 Questions & Answers

    Includes questions types found on actual exam such as drag and drop, simulation, type in, and fill in the blank.

  • 25
    Terraform Associate 004 Video Course

    Terraform Associate 004 Training Course

    118 Video Lectures

    Based on Real Life Scenarios which you will encounter in exam and learn by working with real equipment.

  • exam =30
    Study Guide

    Terraform Associate 004 Study Guide

    285 PDF Pages

    Study Guide developed by industry experts who have written exams in the past. They are technology-specific IT certification researchers with at least a decade of experience at Fortune 500 companies.

exam =32

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

Guarantee

Satisfaction Guaranteed

Pass4sure has a remarkable HashiCorp Candidate Success record. We're confident of our products and provide no hassle product exchange. That's how confident we are!

99.3% Pass Rate
Total Cost: $194.97
Bundle Price: $149.98

Purchase Individually

  • exam =34
    Questions & Answers

    Questions & Answers

    167 Questions

    $124.99
    exam =35
  • exam =37
    Terraform Associate 004 Video Course

    Training Course

    118 Video Lectures

    $39.99
  • exam =36
    Study Guide

    Study Guide

    285 PDF Pages

    $29.99

HashiCorp Terraform Associate 004 Practice Test 45

Question 440

A Terraform associate evaluates: A security tester checks whether a newly supplied secret appears in the saved execution plan. Select TWO complementary responses: the appropriate action AND direct evidence it worked.

  1. Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions.
  2. Malformed input values can drive unsupported sizes or unsafe configuration even when their basic types are valid.
  3. Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values.
  4. A small console evaluation verifies indexing and keys match the intended collection semantics.
  5. A supported write-only argument updates the target without storing the supplied secret in state or plan.

Explanation

Correct Answers

C:

The case says: A security tester checks whether a newly supplied secret appears in the saved execution plan. The directly relevant Terraform response is: Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values. This addresses the related failure mode: Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. Validate the result by checking: A supported write-only argument updates the target without storing the supplied secret in state or plan. The selection matches this objective, rather than a different Terraform administration task.

E:

The observed situation is: A security tester checks whether a newly supplied secret appears in the saved execution plan. The acceptance evidence is: A supported write-only argument updates the target without storing the supplied secret in state or plan. It verifies the corrective approach (Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values.) and controls the risk: Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. Checking an unrelated Terraform setting would not prove the stated requirement was met.

Incorrect Answers

A:

Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions. This belongs to Sensitive variables versus ephemeral variables (official objective 4h). Its separate risk is that a secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. The question instead tests Provider write-only arguments and Vault integration; that other safeguard alone does not verify it.

B:

Malformed input values can drive unsupported sizes or unsafe configuration even when their basic types are valid. This is relevant to Input variable validation rules (official objective 4g). Its distinct failure risk is that malformed input values can drive unsupported sizes or unsafe configuration even when their basic types are valid. The present question tests Provider write-only arguments and Vault integration, which this measure alone does not establish.

D:

A small console evaluation verifies indexing and keys match the intended collection semantics. This addresses Terraform list set and map collections (official objective 4d). The separate hazard is that using a set where stable indices are required can make addressing and ordering assumptions invalid. It does not by itself satisfy the case-specific requirement for Provider write-only arguments and Vault integration.

Question 441

A Terraform engineer reports: A mono-repo contains a reusable network module under modules/network. Which action BEST addresses the specific Terraform Associate (004) requirement?

  1. Use a version constraint on registry-sourced modules and review deliberate upgrades according to module compatibility.
  2. Declare child module inputs inside the child and pass values through module block arguments from the parent; do not assume root variables magically populate children.
  3. Use a valid Git or registry module source and pin a ref or compatible module version where the source type supports it.
  4. Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory.

Explanation

Correct Answer

D:

The case says: A mono-repo contains a reusable network module under modules/network. The directly relevant Terraform response is: Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory. This addresses the related failure mode: A nonexistent local module path prevents init from loading the module, and a module name is not itself a source path. Validate the result by checking: The module resolves from the intended repository subdirectory and resources are addressed under module.NAME. The selection matches this objective, rather than a different Terraform administration task.

Incorrect Answers

A:

Use a version constraint on registry-sourced modules and review deliberate upgrades according to module compatibility. This belongs to Registry module version selection (official objective 5d). Its separate risk is that without version control, an external registry module may change behavior across environments as newer releases appear. The question instead tests Local module source paths; that other safeguard alone does not verify it.

B:

Declare child module inputs inside the child and pass values through module block arguments from the parent; do not assume root variables magically populate children. This is relevant to Child module input variable scope (official objective 5b). Its distinct failure risk is that a child module that references an undeclared input variable cannot access a similarly named root variable automatically. The present question tests Local module source paths, which this measure alone does not establish.

C:

Use a valid Git or registry module source and pin a ref or compatible module version where the source type supports it. That addresses Remote module sources and pinning (official objective 5a), specifically the hazard that consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. Here the necessary action or evidence is Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory, not that separate control.

Question 442

After a reviewed change, the team checks: A mono-repo contains a reusable network module under modules/network. Which evidence MOST directly proves the selected approach is working?

  1. An init downloads a compatible explicitly selected module version and the change is visible in review.
  2. The downloaded module resolves to the approved source and revision recorded in code and dependency inventory.
  3. The plan contains separately addressed module instances with intentional different settings.
  4. The module resolves from the intended repository subdirectory and resources are addressed under module.NAME.

Explanation

Correct Answer

D:

The observed situation is: A mono-repo contains a reusable network module under modules/network. The acceptance evidence is: The module resolves from the intended repository subdirectory and resources are addressed under module.NAME. It verifies the corrective approach (Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory.) and controls the risk: A nonexistent local module path prevents init from loading the module, and a module name is not itself a source path. Checking an unrelated Terraform setting would not prove the stated requirement was met.

Incorrect Answers

A:

An init downloads a compatible explicitly selected module version and the change is visible in review. This belongs to Registry module version selection (official objective 5d). Its separate risk is that without version control, an external registry module may change behavior across environments as newer releases appear. The question instead tests Local module source paths; that other safeguard alone does not verify it.

B:

The downloaded module resolves to the approved source and revision recorded in code and dependency inventory. This is relevant to Remote module sources and pinning (official objective 5a). Its distinct failure risk is that consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. The present question tests Local module source paths, which this measure alone does not establish.

C:

The plan contains separately addressed module instances with intentional different settings. That addresses Module reuse with distinct inputs (official objective 5c), specifically the hazard that copying module internals instead of reusing its input interface increases drift and maintenance burden. Here the necessary action or evidence is The module resolves from the intended repository subdirectory and resources are addressed under module.NAME, not that separate control.

Question 443

A configuration review reveals: A developer sets source to a module label rather than a relative path. Which action BEST addresses the specific Terraform Associate (004) requirement?

  1. Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory.
  2. Declare child module inputs inside the child and pass values through module block arguments from the parent; do not assume root variables magically populate children.
  3. Use a valid Git or registry module source and pin a ref or compatible module version where the source type supports it.
  4. Run terraform init -upgrade when intentionally updating compatible downloaded modules, and inspect the resulting plan and source changes.

Explanation

Correct Answer

A:

The case says: A developer sets source to a module label rather than a relative path. The directly relevant Terraform response is: Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory. This addresses the related failure mode: A nonexistent local module path prevents init from loading the module, and a module name is not itself a source path. Validate the result by checking: The module resolves from the intended repository subdirectory and resources are addressed under module.NAME. The selection matches this objective, rather than a different Terraform administration task.

Incorrect Answers

B:

Declare child module inputs inside the child and pass values through module block arguments from the parent; do not assume root variables magically populate children. This is relevant to Child module input variable scope (official objective 5b). Its distinct failure risk is that a child module that references an undeclared input variable cannot access a similarly named root variable automatically. The present question tests Local module source paths, which this measure alone does not establish.

C:

Use a valid Git or registry module source and pin a ref or compatible module version where the source type supports it. That addresses Remote module sources and pinning (official objective 5a), specifically the hazard that consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. Here the necessary action or evidence is Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory, not that separate control.

D:

Run terraform init -upgrade when intentionally updating compatible downloaded modules, and inspect the resulting plan and source changes. This addresses Refresh installed module code after source updates (official objective 5d). The separate hazard is that a cached downloaded module may not reflect a new selected registry release or revised source until reinitialized. It does not by itself satisfy the case-specific requirement for Local module source paths.

Question 444

A Terraform governance audit identifies: A developer sets source to a module label rather than a relative path. What risk MOST directly explains why a correction is needed?

  1. A child module that references an undeclared input variable cannot access a similarly named root variable automatically.
  2. Broad sensitive outputs can leak implementation details and secrets while coupling callers to module internals.
  3. A nonexistent local module path prevents init from loading the module, and a module name is not itself a source path.
  4. Consuming a mutable remote branch without an intended ref can change module behavior unexpectedly.

Explanation

Correct Answer

C:

The reported issue (A developer sets source to a module label rather than a relative path) exposes the risk: A nonexistent local module path prevents init from loading the module, and a module name is not itself a source path. The corrective action is: Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory. Confirm with: The module resolves from the intended repository subdirectory and resources are addressed under module.NAME. The risk is specific to this configuration or operation, not an unrelated Terraform feature.

Incorrect Answers

A:

A child module that references an undeclared input variable cannot access a similarly named root variable automatically. This belongs to Child module input variable scope (official objective 5b). Its separate risk is that a child module that references an undeclared input variable cannot access a similarly named root variable automatically. The question instead tests Local module source paths; that other safeguard alone does not verify it.

B:

Broad sensitive outputs can leak implementation details and secrets while coupling callers to module internals. This is relevant to Module outputs as a public interface (official objective 5c). Its distinct failure risk is that broad sensitive outputs can leak implementation details and secrets while coupling callers to module internals. The present question tests Local module source paths, which this measure alone does not establish.

D:

Consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. This addresses Remote module sources and pinning (official objective 5a). The separate hazard is that consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. It does not by itself satisfy the case-specific requirement for Local module source paths.

Question 445

During a controlled infrastructure change, a team observes: A root configuration should load checked-in common infrastructure without publishing it to a registry. Which action BEST addresses the specific Terraform Associate (004) requirement?

  1. Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory.
  2. Expose child module outputs explicitly, and access them through module.NAME.OUTPUT rather than private internal symbols.
  3. Declare child module inputs inside the child and pass values through module block arguments from the parent; do not assume root variables magically populate children.
  4. Use a valid Git or registry module source and pin a ref or compatible module version where the source type supports it.

Explanation

Correct Answer

A:

The case says: A root configuration should load checked-in common infrastructure without publishing it to a registry. The directly relevant Terraform response is: Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory. This addresses the related failure mode: A nonexistent local module path prevents init from loading the module, and a module name is not itself a source path. Validate the result by checking: The module resolves from the intended repository subdirectory and resources are addressed under module.NAME. The selection matches this objective, rather than a different Terraform administration task.

Incorrect Answers

B:

Expose child module outputs explicitly, and access them through module.NAME.OUTPUT rather than private internal symbols. This is relevant to Parent scope and module output boundaries (official objective 5b). Its distinct failure risk is that directly referencing a child's local or resource name from the parent violates module encapsulation and may fail validation. The present question tests Local module source paths, which this measure alone does not establish.

C:

Declare child module inputs inside the child and pass values through module block arguments from the parent; do not assume root variables magically populate children. That addresses Child module input variable scope (official objective 5b), specifically the hazard that a child module that references an undeclared input variable cannot access a similarly named root variable automatically. Here the necessary action or evidence is Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory, not that separate control.

D:

Use a valid Git or registry module source and pin a ref or compatible module version where the source type supports it. This addresses Remote module sources and pinning (official objective 5a). The separate hazard is that consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. It does not by itself satisfy the case-specific requirement for Local module source paths.

Question 446

An operator wants proof regarding: A root configuration should load checked-in common infrastructure without publishing it to a registry. Which evidence MOST directly proves the selected approach is working?

  1. After the reviewed upgrade, module contents and plan correspond to the intended remote version.
  2. The downloaded module resolves to the approved source and revision recorded in code and dependency inventory.
  3. An output declared in the child resolves for the parent and is passed to a sibling module correctly.
  4. The module resolves from the intended repository subdirectory and resources are addressed under module.NAME.

Explanation

Correct Answer

D:

The observed situation is: A root configuration should load checked-in common infrastructure without publishing it to a registry. The acceptance evidence is: The module resolves from the intended repository subdirectory and resources are addressed under module.NAME. It verifies the corrective approach (Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory.) and controls the risk: A nonexistent local module path prevents init from loading the module, and a module name is not itself a source path. Checking an unrelated Terraform setting would not prove the stated requirement was met.

Incorrect Answers

A:

After the reviewed upgrade, module contents and plan correspond to the intended remote version. This belongs to Refresh installed module code after source updates (official objective 5d). Its separate risk is that a cached downloaded module may not reflect a new selected registry release or revised source until reinitialized. The question instead tests Local module source paths; that other safeguard alone does not verify it.

B:

The downloaded module resolves to the approved source and revision recorded in code and dependency inventory. This is relevant to Remote module sources and pinning (official objective 5a). Its distinct failure risk is that consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. The present question tests Local module source paths, which this measure alone does not establish.

C:

An output declared in the child resolves for the parent and is passed to a sibling module correctly. That addresses Parent scope and module output boundaries (official objective 5b), specifically the hazard that directly referencing a child's local or resource name from the parent violates module encapsulation and may fail validation. Here the necessary action or evidence is The module resolves from the intended repository subdirectory and resources are addressed under module.NAME, not that separate control.

Question 447

An infrastructure deployment design calls for: A module source moves to a new directory and init can no longer find it. Which action BEST addresses the specific Terraform Associate (004) requirement?

  1. Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory.
  2. Use a version constraint on registry-sourced modules and review deliberate upgrades according to module compatibility.
  3. Use a valid Git or registry module source and pin a ref or compatible module version where the source type supports it.
  4. Expose child module outputs explicitly, and access them through module.NAME.OUTPUT rather than private internal symbols.

Explanation

Correct Answer

A:

The case says: A module source moves to a new directory and init can no longer find it. The directly relevant Terraform response is: Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory. This addresses the related failure mode: A nonexistent local module path prevents init from loading the module, and a module name is not itself a source path. Validate the result by checking: The module resolves from the intended repository subdirectory and resources are addressed under module.NAME. The selection matches this objective, rather than a different Terraform administration task.

Incorrect Answers

B:

Use a version constraint on registry-sourced modules and review deliberate upgrades according to module compatibility. This is relevant to Registry module version selection (official objective 5d). Its distinct failure risk is that without version control, an external registry module may change behavior across environments as newer releases appear. The present question tests Local module source paths, which this measure alone does not establish.

C:

Use a valid Git or registry module source and pin a ref or compatible module version where the source type supports it. That addresses Remote module sources and pinning (official objective 5a), specifically the hazard that consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. Here the necessary action or evidence is Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory, not that separate control.

D:

Expose child module outputs explicitly, and access them through module.NAME.OUTPUT rather than private internal symbols. This addresses Parent scope and module output boundaries (official objective 5b). The separate hazard is that directly referencing a child's local or resource name from the parent violates module encapsulation and may fail validation. It does not by itself satisfy the case-specific requirement for Local module source paths.

Question 448

A production-readiness review highlights: A module source moves to a new directory and init can no longer find it. What risk MOST directly explains why a correction is needed?

  1. A nonexistent local module path prevents init from loading the module, and a module name is not itself a source path.
  2. Without version control, an external registry module may change behavior across environments as newer releases appear.
  3. Directly referencing a child's local or resource name from the parent violates module encapsulation and may fail validation.
  4. Consuming a mutable remote branch without an intended ref can change module behavior unexpectedly.

Explanation

Correct Answer

A:

The reported issue (A module source moves to a new directory and init can no longer find it) exposes the risk: A nonexistent local module path prevents init from loading the module, and a module name is not itself a source path. The corrective action is: Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory. Confirm with: The module resolves from the intended repository subdirectory and resources are addressed under module.NAME. The risk is specific to this configuration or operation, not an unrelated Terraform feature.

Incorrect Answers

B:

Without version control, an external registry module may change behavior across environments as newer releases appear. This is relevant to Registry module version selection (official objective 5d). Its distinct failure risk is that without version control, an external registry module may change behavior across environments as newer releases appear. The present question tests Local module source paths, which this measure alone does not establish.

C:

Directly referencing a child's local or resource name from the parent violates module encapsulation and may fail validation. That is the exact risk associated with Parent scope and module output boundaries (official objective 5b), not the required Local module source paths outcome.

D:

Consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. This addresses Remote module sources and pinning (official objective 5a). The separate hazard is that consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. It does not by itself satisfy the case-specific requirement for Local module source paths.

Question 449

An operations team needs to resolve: A project needs a repeatable way to reuse a small child module from the same repository. Which action BEST addresses the specific Terraform Associate (004) requirement?

  1. Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory.
  2. Use a version constraint on registry-sourced modules and review deliberate upgrades according to module compatibility.
  3. Use a valid Git or registry module source and pin a ref or compatible module version where the source type supports it.
  4. Instantiate the same reusable child module more than once with different inputs and stable module names to create separately managed resource groups.

Explanation

Correct Answer

A:

The case says: A project needs a repeatable way to reuse a small child module from the same repository. The directly relevant Terraform response is: Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory. This addresses the related failure mode: A nonexistent local module path prevents init from loading the module, and a module name is not itself a source path. Validate the result by checking: The module resolves from the intended repository subdirectory and resources are addressed under module.NAME. The selection matches this objective, rather than a different Terraform administration task.

Incorrect Answers

B:

Use a version constraint on registry-sourced modules and review deliberate upgrades according to module compatibility. This is relevant to Registry module version selection (official objective 5d). Its distinct failure risk is that without version control, an external registry module may change behavior across environments as newer releases appear. The present question tests Local module source paths, which this measure alone does not establish.

C:

Use a valid Git or registry module source and pin a ref or compatible module version where the source type supports it. That addresses Remote module sources and pinning (official objective 5a), specifically the hazard that consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. Here the necessary action or evidence is Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory, not that separate control.

D:

Instantiate the same reusable child module more than once with different inputs and stable module names to create separately managed resource groups. This addresses Module reuse with distinct inputs (official objective 5c). The separate hazard is that copying module internals instead of reusing its input interface increases drift and maintenance burden. It does not by itself satisfy the case-specific requirement for Local module source paths.

Question 450

A Terraform associate evaluates: A project needs a repeatable way to reuse a small child module from the same repository. Select TWO complementary responses: the appropriate action AND direct evidence it worked.

  1. Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory.
  2. The module resolves from the intended repository subdirectory and resources are addressed under module.NAME.
  3. Directly referencing a child's local or resource name from the parent violates module encapsulation and may fail validation.
  4. Use a valid Git or registry module source and pin a ref or compatible module version where the source type supports it.
  5. An init downloads a compatible explicitly selected module version and the change is visible in review.

Explanation

Correct Answers

A:

The case says: A project needs a repeatable way to reuse a small child module from the same repository. The directly relevant Terraform response is: Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory. This addresses the related failure mode: A nonexistent local module path prevents init from loading the module, and a module name is not itself a source path. Validate the result by checking: The module resolves from the intended repository subdirectory and resources are addressed under module.NAME. The selection matches this objective, rather than a different Terraform administration task.

B:

The observed situation is: A project needs a repeatable way to reuse a small child module from the same repository. The acceptance evidence is: The module resolves from the intended repository subdirectory and resources are addressed under module.NAME. It verifies the corrective approach (Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory.) and controls the risk: A nonexistent local module path prevents init from loading the module, and a module name is not itself a source path. Checking an unrelated Terraform setting would not prove the stated requirement was met.

Incorrect Answers

C:

Directly referencing a child's local or resource name from the parent violates module encapsulation and may fail validation. That is the exact risk associated with Parent scope and module output boundaries (official objective 5b), not the required Local module source paths outcome.

D:

Use a valid Git or registry module source and pin a ref or compatible module version where the source type supports it. This addresses Remote module sources and pinning (official objective 5a). The separate hazard is that consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. It does not by itself satisfy the case-specific requirement for Local module source paths.

E:

An init downloads a compatible explicitly selected module version and the change is visible in review. This does not provide the required Local module source paths action-and-evidence pair.