HashiCorp Terraform Associate 004 Exam Dumps, Practice Test Questions

100% Latest & Updated HashiCorp Terraform Associate 004 Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!

HashiCorp Terraform Associate 004 Premium Bundle
$64.98
$54.98

Terraform Associate 004 Premium Bundle

  • Premium File: 167 Questions & Answers. Last update: Nov 9, 2026
  • Study Guide: 285 Pages
  • Latest Questions
  • 100% Accurate Answers
  • Fast Exam Updates

Terraform Associate 004 Premium Bundle

HashiCorp Terraform Associate 004 Premium Bundle
  • Premium File: 167 Questions & Answers. Last update: Nov 9, 2026
  • Study Guide: 285 Pages
  • Latest Questions
  • 100% Accurate Answers
  • Fast Exam Updates
$64.98
$54.98

HashiCorp Terraform Associate 004 Practice Test 23

Question 220

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A resource argument refers to an output produced by a child module, but the author attempts to read the child's internal local name directly. and Workstream B: A developer uses a fresh local Terraform directory with no backend block and asks where state will be written after apply. and Workstream C: A university repeats a six-network, three-environment build by copying screenshots of console clicks, and auditors cannot reconstruct which settings produced the last deployment. Select exactly 3 actions, one addressing each distinct workstream.

  1. Run terraform fmt -recursive on the intended directory tree after reviewing the file scope.
  2. Configure separate HCP workspaces with correct working directories and path-based VCS run triggers.
  3. Expect the default local backend to manage a terraform.tfstate file in the working directory.
  4. Review the intended registry release and run terraform init -upgrade after updating constraints as needed.
  5. Describe the desired networks and dependencies in versioned Terraform configuration and review plans before applying.
  6. Expose the needed value through an output block in the child and reference module.child.output_name.

Explanation

Correct Answers

C:

For the workstream in which a developer uses a fresh local Terraform directory with no backend block and asks where state will be written after apply, use this action: Expect the default local backend to manage a terraform.tfstate file in the working directory. Without an alternate backend or cloud integration, Terraform defaults to local state storage. Verify: A successful local apply creates or updates a locally persisted state snapshot for the selected workspace. Limitation: State can contain sensitive values and should be protected against accidental exposure or competing writers.

E:

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

F:

For the workstream in which a resource argument refers to an output produced by a child module, but the author attempts to read the child's internal local name directly, use this action: Expose the needed value through an output block in the child and reference module.child.output_name. Module outputs deliberately publish selected results across scope boundaries. Verify: The root plan evaluates a public module output without reaching into private child locals. Limitation: A module output is an interface; it does not automatically expose every internal resource or local.

Incorrect Answers

A:

This action is appropriate instead for a different, unlisted requirement: A developer needs to format all Terraform files in nested module directories as part of a repository cleanup. It would be checked by: The command rewrites formatting of Terraform configuration files in nested directories. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

B:

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

D:

This action is appropriate instead for a different, unlisted requirement: A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. It would be checked by: The initialized module source matches the new permitted version and the resulting plan is reviewed. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

Question 221

An infrastructure team faces this specific situation: A deployment needs separate port numbers per environment and a documented default for developer sandboxes. Which Terraform action most directly satisfies the requirement?

  1. Declare an input variable with type number and an appropriate default, overriding it per environment when needed.
  2. Use a conditional expression over a declared environment variable to select the appropriate hostname.
  3. Consider lifecycle create_before_destroy on the managed resource after confirming simultaneous old and new instances are permitted.
  4. Use an ephemeral input value in an allowed Terraform ephemeral context, such as a supported provider configuration.

Explanation

Correct Answer

A:

Declare an input variable with type number and an appropriate default, overriding it per environment when needed. Input variables parameterize a module; outputs report values out of the module. Verify: Plans show environment-specific port values while preserving the declared type constraint. Limitation: Defaults should not embed production secrets or bypass review of production-specific values.

Incorrect Answers

B:

This is linked to a different situation: A deployment needs to choose a service hostname based on whether the environment is production. There the relevant decision is: Use a conditional expression over a declared environment variable to select the appropriate hostname. For the question's actual requirement — A deployment needs separate port numbers per environment and a documented default for developer sandboxes. — the specifically relevant decision is: Declare an input variable with type number and an appropriate default, overriding it per environment when needed. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A service cannot tolerate downtime when replacing a VM and the provider's planned operation requires destroy-and-create. There the relevant decision is: Consider lifecycle create_before_destroy on the managed resource after confirming simultaneous old and new instances are permitted. For the question's actual requirement — A deployment needs separate port numbers per environment and a documented default for developer sandboxes. — the specifically relevant decision is: Declare an input variable with type number and an appropriate default, overriding it per environment when needed. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A short-lived token must be used during an operation, and auditors require that the token not be written to a plan file. There the relevant decision is: Use an ephemeral input value in an allowed Terraform ephemeral context, such as a supported provider configuration. For the question's actual requirement — A deployment needs separate port numbers per environment and a documented default for developer sandboxes. — the specifically relevant decision is: Declare an input variable with type number and an appropriate default, overriding it per environment when needed. It would therefore not resolve or assess the case as stated.

Question 222

A reviewer is confirming a change for the following use case: A deployment needs separate port numbers per environment and a documented default for developer sandboxes. The implementation follows this approach: Declare an input variable with type number and an appropriate default, overriding it per environment when needed. Which observation or acceptance test most directly verifies the intended result?

  1. The root plan evaluates a public module output without reaching into private child locals.
  2. Invalid records with wrong attribute types fail validation rather than causing obscure downstream errors.
  3. The evaluated expression points to the correct keyed instance address in the plan.
  4. Plans show environment-specific port values while preserving the declared type constraint.

Explanation

Correct Answer

D:

Acceptance evidence: Plans show environment-specific port values while preserving the declared type constraint. It validates the proposed action, declare an input variable with type number and an appropriate default, overriding it per environment when needed, because input variables parameterize a module; outputs report values out of the module. Remaining limitation: Defaults should not embed production secrets or bypass review of production-specific values.

Incorrect Answers

A:

This is linked to a different situation: A resource argument refers to an output produced by a child module, but the author attempts to read the child's internal local name directly. There the relevant acceptance is: The root plan evaluates a public module output without reaching into private child locals. For the question's actual requirement — A deployment needs separate port numbers per environment and a documented default for developer sandboxes. — the specifically relevant acceptance is: Plans show environment-specific port values while preserving the declared type constraint. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A developer defines a subnet inventory in which every subnet has cidr, zone, and public attributes, and needs reliable shape checking. There the relevant acceptance is: Invalid records with wrong attribute types fail validation rather than causing obscure downstream errors. For the question's actual requirement — A deployment needs separate port numbers per environment and a documented default for developer sandboxes. — the specifically relevant acceptance is: Plans show environment-specific port values while preserving the declared type constraint. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A module uses for_each on a map of regions and must output one subnet ID for the us-east-1 instance. There the relevant acceptance is: The evaluated expression points to the correct keyed instance address in the plan. For the question's actual requirement — A deployment needs separate port numbers per environment and a documented default for developer sandboxes. — the specifically relevant acceptance is: Plans show environment-specific port values while preserving the declared type constraint. It would therefore not resolve or assess the case as stated.

Question 223

Consider a proposed solution for this requirement: A deployment needs separate port numbers per environment and a documented default for developer sandboxes. The team plans to do the following: Declare an input variable with type number and an appropriate default, overriding it per environment when needed. Which limitation or operational caveat must remain in the review?

  1. An automatically changing latest-image lookup may propose later VM replacements depending on resource schema.
  2. Checks and preconditions have different failure effects, so choose based on governance needs.
  3. Defaults should not embed production secrets or bypass review of production-specific values.
  4. Ignore rules do not ignore the attribute at initial resource creation and can hide meaningful drift if used too broadly.

Explanation

Correct Answer

C:

The limitation is defaults should not embed production secrets or bypass review of production-specific values. The proposed change is declare an input variable with type number and an appropriate default, overriding it per environment when needed. Validate it by checking plans show environment-specific port values while preserving the declared type constraint. Input variables parameterize a module; outputs report values out of the module.

Incorrect Answers

A:

This is linked to a different situation: A module uses a provider data source to find the newest image and a resource block to launch a VM from its returned identifier. There the relevant limitation is: An automatically changing latest-image lookup may propose later VM replacements depending on resource schema. For the question's actual requirement — A deployment needs separate port numbers per environment and a documented default for developer sandboxes. — the specifically relevant limitation is: Defaults should not embed production secrets or bypass review of production-specific values. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: An operations group wants an infrastructure health assertion that can report a diagnostic without behaving exactly like a resource precondition. There the relevant limitation is: Checks and preconditions have different failure effects, so choose based on governance needs. For the question's actual requirement — A deployment needs separate port numbers per environment and a documented default for developer sandboxes. — the specifically relevant limitation is: Defaults should not embed production secrets or bypass review of production-specific values. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A managed resource's tag is updated by an external compliance agent, and Terraform must not revert only that tag on every plan. There the relevant limitation is: Ignore rules do not ignore the attribute at initial resource creation and can hide meaningful drift if used too broadly. For the question's actual requirement — A deployment needs separate port numbers per environment and a documented default for developer sandboxes. — the specifically relevant limitation is: Defaults should not embed production secrets or bypass review of production-specific values. It would therefore not resolve or assess the case as stated.

Question 224

The team is reviewing a Terraform implementation for this case: A deployment needs separate port numbers per environment and a documented default for developer sandboxes. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Use a list and assume duplicate elements are automatically removed while maintaining indices.
  2. Treat a for expression as a command that modifies original remote resources in-place.
  3. Use an output block to accept a runtime port supplied by the caller.
  4. Use type string for the entire nested subnet inventory and rely on implicit parsing of every field.

Explanation

Correct Answer

C:

Reject the assumption: Use an output block to accept a runtime port supplied by the caller. Instead, declare an input variable with type number and an appropriate default, overriding it per environment when needed. Input variables parameterize a module; outputs report values out of the module. Acceptance evidence: Plans show environment-specific port values while preserving the declared type constraint.

Incorrect Answers

A:

This is linked to a different situation: A security allowlist is an unordered set of unique ports and duplicate entries must not affect the configuration. There the relevant misconception is: Use a list and assume duplicate elements are automatically removed while maintaining indices. For the question's actual requirement — A deployment needs separate port numbers per environment and a documented default for developer sandboxes. — the specifically relevant misconception is: Use an output block to accept a runtime port supplied by the caller. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A pipeline produces a list of service names with inconsistent letter casing and needs normalized DNS labels. There the relevant misconception is: Treat a for expression as a command that modifies original remote resources in-place. For the question's actual requirement — A deployment needs separate port numbers per environment and a documented default for developer sandboxes. — the specifically relevant misconception is: Use an output block to accept a runtime port supplied by the caller. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A developer defines a subnet inventory in which every subnet has cidr, zone, and public attributes, and needs reliable shape checking. There the relevant misconception is: Use type string for the entire nested subnet inventory and rely on implicit parsing of every field. For the question's actual requirement — A deployment needs separate port numbers per environment and a documented default for developer sandboxes. — the specifically relevant misconception is: Use an output block to accept a runtime port supplied by the caller. It would therefore not resolve or assess the case as stated.

Question 225

A Terraform platform team is coordinating 2 independent decisions. Workstream A: A deployment needs separate port numbers per environment and a documented default for developer sandboxes. and Workstream B: A team's state file is stored on a laptop and must be shared across several engineers without copying it manually after every change. Select exactly 2 actions, one addressing each distinct workstream.

  1. Use for_each on the module block and reference module.stack["test"].endpoint.
  2. Run terraform plan -destroy to inspect the destruction actions without applying them.
  3. Configure an appropriate supported remote backend with secure access and locking rather than emailing terraform.tfstate.
  4. Use terraform validate against initialized providers to catch unsupported or missing arguments.
  5. Declare an input variable with type number and an appropriate default, overriding it per environment when needed.

Explanation

Correct Answers

C:

For the workstream in which a team's state file is stored on a laptop and must be shared across several engineers without copying it manually after every change, use this action: Configure an appropriate supported remote backend with secure access and locking rather than emailing terraform.tfstate. Central state storage reduces divergent management views across collaborators. Verify: Multiple team members read one central state snapshot and serialized operations when the backend supports locking. Limitation: Remote storage is only as safe as its access policy, encryption, versioning, and locking support.

E:

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

Incorrect Answers

A:

This option addresses a separate requirement: A module is instantiated for each environment in a map, and the root needs the output for the test environment. Evidence for that other requirement would be the keyed module instance exposes only the test environment's selected output; neither listed workstream asks for it.

B:

This option addresses a separate requirement: A training team wants to preview removal of all managed sandbox objects but not execute the deletion yet. Evidence for that other requirement would be the output enumerates expected managed-object deletions and remains speculative; neither listed workstream asks for it.

D:

This option addresses a separate requirement: A commit is syntactically valid HCL but includes a resource argument not supported by the installed provider schema. Evidence for that other requirement would be validation reports schema errors without making changes to remote infrastructure; neither listed workstream asks for it.

Question 226

An infrastructure team faces this specific situation: An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. Which Terraform action most directly satisfies the requirement?

  1. Define a root output whose value references the managed load balancer's endpoint attribute.
  2. Use a list(string) or tuple with explicit ordering semantics rather than a set.
  3. Declare map(string) as the input type and select an entry by key, such as var.instance_class["staging"].
  4. Use for_each over a suitable set or map to create stable keyed resource instances.

Explanation

Correct Answer

A:

Define a root output whose value references the managed load balancer's endpoint attribute. Output blocks expose evaluated results and can depend on managed resource attributes. Verify: After apply, terraform output reports the expected endpoint from state. Limitation: An output does not create the referenced endpoint, and sensitive output values need safe handling.

Incorrect Answers

B:

This is linked to a different situation: A module emits an ordered list of three subnet IDs aligned with ordered availability zones and consumers depend on position. There the relevant decision is: Use a list(string) or tuple with explicit ordering semantics rather than a set. For the question's actual requirement — An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. — the specifically relevant decision is: Define a root output whose value references the managed load balancer's endpoint attribute. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A configuration needs a map from environment names to individually selected instance classes, with each value a string. There the relevant decision is: Declare map(string) as the input type and select an entry by key, such as var.instance_class["staging"]. For the question's actual requirement — An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. — the specifically relevant decision is: Define a root output whose value references the managed load balancer's endpoint attribute. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: An application team must create one DNS record per hostname from a stable set of known domain names. There the relevant decision is: Use for_each over a suitable set or map to create stable keyed resource instances. For the question's actual requirement — An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. — the specifically relevant decision is: Define a root output whose value references the managed load balancer's endpoint attribute. It would therefore not resolve or assess the case as stated.

Question 227

A reviewer is confirming a change for the following use case: An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. The implementation follows this approach: Define a root output whose value references the managed load balancer's endpoint attribute. Which observation or acceptance test most directly verifies the intended result?

  1. Invalid records with wrong attribute types fail validation rather than causing obscure downstream errors.
  2. Subsequent plans avoid proposing updates solely because the ignored tag changed outside Terraform.
  3. The computed list contains each intended service name normalized consistently.
  4. After apply, terraform output reports the expected endpoint from state.

Explanation

Correct Answer

D:

Acceptance evidence: After apply, terraform output reports the expected endpoint from state. It validates the proposed action, define a root output whose value references the managed load balancer's endpoint attribute, because output blocks expose evaluated results and can depend on managed resource attributes. Remaining limitation: An output does not create the referenced endpoint, and sensitive output values need safe handling.

Incorrect Answers

A:

This is linked to a different situation: A developer defines a subnet inventory in which every subnet has cidr, zone, and public attributes, and needs reliable shape checking. There the relevant acceptance is: Invalid records with wrong attribute types fail validation rather than causing obscure downstream errors. For the question's actual requirement — An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. — the specifically relevant acceptance is: After apply, terraform output reports the expected endpoint from state. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A managed resource's tag is updated by an external compliance agent, and Terraform must not revert only that tag on every plan. There the relevant acceptance is: Subsequent plans avoid proposing updates solely because the ignored tag changed outside Terraform. For the question's actual requirement — An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. — the specifically relevant acceptance is: After apply, terraform output reports the expected endpoint from state. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A pipeline produces a list of service names with inconsistent letter casing and needs normalized DNS labels. There the relevant acceptance is: The computed list contains each intended service name normalized consistently. For the question's actual requirement — An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. — the specifically relevant acceptance is: After apply, terraform output reports the expected endpoint from state. It would therefore not resolve or assess the case as stated.

Question 228

Consider a proposed solution for this requirement: An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. The team plans to do the following: Define a root output whose value references the managed load balancer's endpoint attribute. Which limitation or operational caveat must remain in the review?

  1. An output does not create the referenced endpoint, and sensitive output values need safe handling.
  2. Collision after normalization must be handled explicitly; lower() alone does not ensure uniqueness.
  3. Only explicitly write-only provider arguments qualify; an arbitrary normal password argument is not automatically safe.
  4. Custom validation must reflect the true policy; a syntactically valid condition may be overly broad or restrictive.

Explanation

Correct Answer

A:

The limitation is an output does not create the referenced endpoint, and sensitive output values need safe handling. The proposed change is define a root output whose value references the managed load balancer's endpoint attribute. Validate it by checking after apply, terraform output reports the expected endpoint from state. Output blocks expose evaluated results and can depend on managed resource attributes.

Incorrect Answers

B:

This is linked to a different situation: A pipeline produces a list of service names with inconsistent letter casing and needs normalized DNS labels. There the relevant limitation is: Collision after normalization must be handled explicitly; lower() alone does not ensure uniqueness. For the question's actual requirement — An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. — the specifically relevant limitation is: An output does not create the referenced endpoint, and sensitive output values need safe handling. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A database API supports a write-only password argument and the team must avoid persisting the initial password to state. There the relevant limitation is: Only explicitly write-only provider arguments qualify; an arbitrary normal password argument is not automatically safe. For the question's actual requirement — An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. — the specifically relevant limitation is: An output does not create the referenced endpoint, and sensitive output values need safe handling. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A reusable module needs to reject a user-provided CIDR that is outside a documented allowed address family. There the relevant limitation is: Custom validation must reflect the true policy; a syntactically valid condition may be overly broad or restrictive. For the question's actual requirement — An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. — the specifically relevant limitation is: An output does not create the referenced endpoint, and sensitive output values need safe handling. It would therefore not resolve or assess the case as stated.

Question 229

The team is reviewing a Terraform implementation for this case: An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Assume create_before_destroy guarantees zero downtime even when duplicate names are forbidden.
  2. Hardcode a stale image identifier while retaining a data source solely as decoration.
  3. Assume any object named in a data block is subject to resource deletion on destroy.
  4. Declare a variable named endpoint and assume it automatically exports the created object's address.

Explanation

Correct Answer

D:

Reject the assumption: Declare a variable named endpoint and assume it automatically exports the created object's address. Instead, define a root output whose value references the managed load balancer's endpoint attribute. Output blocks expose evaluated results and can depend on managed resource attributes. Acceptance evidence: After apply, terraform output reports the expected endpoint from state.

Incorrect Answers

A:

This is linked to a different situation: A service cannot tolerate downtime when replacing a VM and the provider's planned operation requires destroy-and-create. There the relevant misconception is: Assume create_before_destroy guarantees zero downtime even when duplicate names are forbidden. For the question's actual requirement — An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. — the specifically relevant misconception is: Declare a variable named endpoint and assume it automatically exports the created object's address. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A module uses a provider data source to find the newest image and a resource block to launch a VM from its returned identifier. There the relevant misconception is: Hardcode a stale image identifier while retaining a data source solely as decoration. For the question's actual requirement — An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. — the specifically relevant misconception is: Declare a variable named endpoint and assume it automatically exports the created object's address. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: An engineer sees a data block representing a preexisting DNS zone and wants to delete that DNS zone with terraform destroy. There the relevant misconception is: Assume any object named in a data block is subject to resource deletion on destroy. For the question's actual requirement — An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. — the specifically relevant misconception is: Declare a variable named endpoint and assume it automatically exports the created object's address. It would therefore not resolve or assess the case as stated.

Question 230

A Terraform platform team is coordinating 3 independent decisions. Workstream A: An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. and Workstream B: An engineer wants to commit the local .terraform directory to source control because it contains provider caches and backend settings. and Workstream C: A logistics firm needs a private data-center virtual machine and a public-cloud DNS record managed from one reviewed release. Select exactly 3 actions, one addressing each distinct workstream.

  1. Ignore .terraform and protect state while committing the intended HCL and provider dependency lock file.
  2. Declare resources through separate compatible providers in one Terraform configuration, with references for dependencies.
  3. Use terraform validate against initialized providers to catch unsupported or missing arguments.
  4. Use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs.
  5. Define a root output whose value references the managed load balancer's endpoint attribute.
  6. Specify a reviewed registry-module version constraint in the module block.

Explanation

Correct Answers

A:

For the workstream in which an engineer wants to commit the local .terraform directory to source control because it contains provider caches and backend settings, use this action: Ignore .terraform and protect state while committing the intended HCL and provider dependency lock file. The initialization cache is machine-local and may carry sensitive backend metadata. Verify: The repository contains reviewed configuration and .terraform.lock.hcl, not transient cache or backend secrets. Limitation: A repo may use a remote backend, but local initialization data can still expose backend credentials.

B:

For the workstream in which a logistics firm needs a private data-center virtual machine and a public-cloud DNS record managed from one reviewed release, use this action: Declare resources through separate compatible providers in one Terraform configuration, with references for dependencies. Terraform's provider model unifies the workflow while delegating API interactions to platform-specific plugins. Verify: A single plan lists the intended private and public resource actions under their respective providers. Limitation: Each endpoint still needs its own supported provider, authentication, connectivity, and permissions.

E:

For the workstream in which an operations team must surface a load balancer endpoint after apply so downstream jobs can consume it, use this action: Define a root output whose value references the managed load balancer's endpoint attribute. Output blocks expose evaluated results and can depend on managed resource attributes. Verify: After apply, terraform output reports the expected endpoint from state. Limitation: An output does not create the referenced endpoint, and sensitive output values need safe handling.

Incorrect Answers

C:

This action is appropriate instead for a different, unlisted requirement: A commit is syntactically valid HCL but includes a resource argument not supported by the installed provider schema. It would be checked by: Validation reports schema errors without making changes to remote infrastructure. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

D:

This action is appropriate instead for a different, unlisted requirement: A team needs one shared network workspace to finish before dependent application workspaces start their own updates. It would be checked by: A successful upstream application can queue the configured downstream workspace run. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

F:

This action is appropriate instead for a different, unlisted requirement: A team uses a module from the public registry and needs to prevent unreviewed minor changes after a security assessment. It would be checked by: Initialization selects a module release satisfying the stated registry version requirement. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

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

UP

SPECIAL OFFER: GET 10% OFF

This is ONE TIME OFFER

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

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

Download Free Demo of VCE Exam Simulator

Experience Avanset VCE Exam Simulator for yourself.

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

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