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 37

Question 360

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. and Workstream B: A security team wants engineers to see policy violations without initially blocking learning-environment applies. and Workstream C: A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. Select exactly 3 actions, one addressing each distinct workstream.

  1. Specify the Git module source with the double-slash subdirectory syntax after the repository path.
  2. Use an advisory policy enforcement setting on the learning workspaces and monitor the warnings.
  3. Run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error.
  4. Use a list(string) or tuple with explicit ordering semantics rather than a set.
  5. Use a dynamic nested block for the repeatable ingress structure when the provider schema allows it.
  6. Declare configuration_aliases in the child and pass the intended configurations through module.providers.

Explanation

Correct Answers

A:

For the workstream in which a monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder, use this action: Specify the Git module source with the double-slash subdirectory syntax after the repository path. Module source syntax can identify both a remote package and its internal module subdirectory. Verify: Initialization loads only the intended child configuration rooted at the named subdirectory. Limitation: The repository must remain accessible, and the subdirectory must actually contain valid Terraform module files.

B:

For the workstream in which a security team wants engineers to see policy violations without initially blocking learning-environment applies, use this action: Use an advisory policy enforcement setting on the learning workspaces and monitor the warnings. Advisory policies surface governance guidance without being mandatory blockers. Verify: Violating plans produce visible advisory policy findings while runs remain allowed to continue. Limitation: Advisory is not the right choice for mandatory production enforcement requirements.

C:

For the workstream in which a compliance team wants to distinguish an empty Terraform plan from one with material changes in automation, use this action: Run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error. Detailed exit codes let automation distinguish successful plans with and without changes. Verify: CI captures and classifies the command exit code separately from console prose. Limitation: The exit-code classification describes planned changes, not their risk or policy approval.

Incorrect Answers

D:

This action is appropriate instead for a different, unlisted requirement: A module emits an ordered list of three subnet IDs aligned with ordered availability zones and consumers depend on position. It would be checked by: The first, second, and third output elements correspond to documented ordered subnet assignments. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

E:

This action is appropriate instead for a different, unlisted requirement: A security group requires multiple repeated ingress blocks derived from a variable collection, and copy-pasting blocks is error-prone. It would be checked by: Each input rule produces a corresponding nested ingress block in the planned resource. 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 child network module expects two AWS provider aliases, but the root module has only passed its default provider. It would be checked by: The child resource plans with the specifically mapped source and destination provider aliases. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

Question 361

An infrastructure team faces this specific situation: A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. Which Terraform action most directly satisfies the requirement?

  1. Specify a reviewed registry-module version constraint in the module block.
  2. Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials.
  3. Use for_each on the module block and reference module.stack["test"].endpoint.
  4. Declare the input in the child and supply environment = var.environment in the root's module call.

Explanation

Correct Answer

D:

Declare the input in the child and supply environment = var.environment in the root's module call. Explicit variable arguments make the child module interface predictable. Verify: Planning resolves the child's environment value from the explicit module call. Limitation: Input variables are scoped to each module and do not implicitly leak across module boundaries.

Incorrect Answers

A:

This is linked to a different situation: A team uses a module from the public registry and needs to prevent unreviewed minor changes after a security assessment. There the relevant decision is: Specify a reviewed registry-module version constraint in the module block. For the question's actual requirement — A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. — the specifically relevant decision is: Declare the input in the child and supply environment = var.environment in the root's module call. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. There the relevant decision is: Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials. For the question's actual requirement — A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. — the specifically relevant decision is: Declare the input in the child and supply environment = var.environment in the root's module call. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A module is instantiated for each environment in a map, and the root needs the output for the test environment. There the relevant decision is: Use for_each on the module block and reference module.stack["test"].endpoint. For the question's actual requirement — A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. — the specifically relevant decision is: Declare the input in the child and supply environment = var.environment in the root's module call. It would therefore not resolve or assess the case as stated.

Question 362

A reviewer is confirming a change for the following use case: A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. The implementation follows this approach: Declare the input in the child and supply environment = var.environment in the root's module call. Which observation or acceptance test most directly verifies the intended result?

  1. Initialization selects a module release satisfying the stated registry version requirement.
  2. Terraform downloads the module code at the intended Git tag or commit during init.
  3. Planning resolves the child's environment value from the explicit module call.
  4. Initialization loads only the intended child configuration rooted at the named subdirectory.

Explanation

Correct Answer

C:

Acceptance evidence: Planning resolves the child's environment value from the explicit module call. It validates the proposed action, declare the input in the child and supply environment = var.environment in the root's module call, because explicit variable arguments make the child module interface predictable. Remaining limitation: Input variables are scoped to each module and do not implicitly leak across module boundaries.

Incorrect Answers

A:

This is linked to a different situation: A team uses a module from the public registry and needs to prevent unreviewed minor changes after a security assessment. There the relevant acceptance is: Initialization selects a module release satisfying the stated registry version requirement. For the question's actual requirement — A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. — the specifically relevant acceptance is: Planning resolves the child's environment value from the explicit module call. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. There the relevant acceptance is: Terraform downloads the module code at the intended Git tag or commit during init. For the question's actual requirement — A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. — the specifically relevant acceptance is: Planning resolves the child's environment value from the explicit module call. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. There the relevant acceptance is: Initialization loads only the intended child configuration rooted at the named subdirectory. For the question's actual requirement — A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. — the specifically relevant acceptance is: Planning resolves the child's environment value from the explicit module call. It would therefore not resolve or assess the case as stated.

Question 363

Consider a proposed solution for this requirement: A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. The team plans to do the following: Declare the input in the child and supply environment = var.environment in the root's module call. Which limitation or operational caveat must remain in the review?

  1. Renaming the test key is an address change unless state moves are handled.
  2. Changing count or order can affect addresses and cause unintended replacements.
  3. Input variables are scoped to each module and do not implicitly leak across module boundaries.
  4. A moving branch ref does not provide the same immutability as a reviewed commit SHA.

Explanation

Correct Answer

C:

The limitation is input variables are scoped to each module and do not implicitly leak across module boundaries. The proposed change is declare the input in the child and supply environment = var.environment in the root's module call. Validate it by checking planning resolves the child's environment value from the explicit module call. Explicit variable arguments make the child module interface predictable.

Incorrect Answers

A:

This is linked to a different situation: A module is instantiated for each environment in a map, and the root needs the output for the test environment. There the relevant limitation is: Renaming the test key is an address change unless state moves are handled. For the question's actual requirement — A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. — the specifically relevant limitation is: Input variables are scoped to each module and do not implicitly leak across module boundaries. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A deployment calls a reusable module with count = 3 and must reference the output of only the second instance. There the relevant limitation is: Changing count or order can affect addresses and cause unintended replacements. For the question's actual requirement — A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. — the specifically relevant limitation is: Input variables are scoped to each module and do not implicitly leak across module boundaries. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. There the relevant limitation is: A moving branch ref does not provide the same immutability as a reviewed commit SHA. For the question's actual requirement — A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. — the specifically relevant limitation is: Input variables are scoped to each module and do not implicitly leak across module boundaries. It would therefore not resolve or assess the case as stated.

Question 364

The team is reviewing a Terraform implementation for this case: A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Assume every variable declared in the root is directly accessible inside all child directories.
  2. Expect version = "~> 2.0" to select a Git tag for an arbitrary Git module source.
  3. Delete the Terraform state to force the new module to be installed.
  4. Address a count-based module as module.worker["second"] without any for_each key.

Explanation

Correct Answer

A:

Reject the assumption: Assume every variable declared in the root is directly accessible inside all child directories. Instead, declare the input in the child and supply environment = var.environment in the root's module call. Explicit variable arguments make the child module interface predictable. Acceptance evidence: Planning resolves the child's environment value from the explicit module call.

Incorrect Answers

B:

This is linked to a different situation: An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. There the relevant misconception is: Expect version = "~> 2.0" to select a Git tag for an arbitrary Git module source. For the question's actual requirement — A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. — the specifically relevant misconception is: Assume every variable declared in the root is directly accessible inside all child directories. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. There the relevant misconception is: Delete the Terraform state to force the new module to be installed. For the question's actual requirement — A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. — the specifically relevant misconception is: Assume every variable declared in the root is directly accessible inside all child directories. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A deployment calls a reusable module with count = 3 and must reference the output of only the second instance. There the relevant misconception is: Address a count-based module as module.worker["second"] without any for_each key. For the question's actual requirement — A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. — the specifically relevant misconception is: Assume every variable declared in the root is directly accessible inside all child directories. It would therefore not resolve or assess the case as stated.

Question 365

A Terraform platform team is coordinating 2 independent decisions. Workstream A: A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. and Workstream B: A compliance team needs centralized access control so reviewers can view runs but only deployers can approve infrastructure changes. Select exactly 2 actions, one addressing each distinct workstream.

  1. Configure an appropriate supported remote backend with secure access and locking rather than emailing terraform.tfstate.
  2. Run terraform init -upgrade after reviewing the intended provider compatibility change.
  3. Declare the input in the child and supply environment = var.environment in the root's module call.
  4. Use terraform validate against initialized providers to catch unsupported or missing arguments.
  5. Assign appropriate HCP Terraform team permissions at the workspace or project level for read versus apply actions.

Explanation

Correct Answers

C:

For the workstream in which a child module uses var.environment but the root module declares an environment variable of the same name and passes nothing, use this action: Declare the input in the child and supply environment = var.environment in the root's module call. Explicit variable arguments make the child module interface predictable. Verify: Planning resolves the child's environment value from the explicit module call. Limitation: Input variables are scoped to each module and do not implicitly leak across module boundaries.

E:

For the workstream in which a compliance team needs centralized access control so reviewers can view runs but only deployers can approve infrastructure changes, use this action: Assign appropriate HCP Terraform team permissions at the workspace or project level for read versus apply actions. Team and project permissions provide separation of duties for collaborative infrastructure changes. Verify: Reviewers can inspect plans and run history while only authorized teams can approve applies. Limitation: Permissions are additive across organizational scopes, so wider grants can override intended narrow restrictions.

Incorrect Answers

A:

This option addresses a separate requirement: A team's state file is stored on a laptop and must be shared across several engineers without copying it manually after every change. Evidence for that other requirement would be multiple team members read one central state snapshot and serialized operations when the backend supports locking; neither listed workstream asks for it.

B:

This option addresses a separate requirement: A project intentionally needs a newer provider version allowed by its constraints, but init keeps reusing the version recorded in the lock file. Evidence for that other requirement would be the updated .terraform.lock.hcl records the newly selected compatible provider and its checksums; 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 366

An infrastructure team faces this specific situation: A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. Which Terraform action most directly satisfies the requirement?

  1. Specify a reviewed registry-module version constraint in the module block.
  2. Declare an output in the child module and reference module.app.database_hostname from the root.
  3. Refer to the indexed module instance, such as module.worker[1].endpoint, with an appropriate count expression.
  4. Review the intended registry release and run terraform init -upgrade after updating constraints as needed.

Explanation

Correct Answer

B:

Declare an output in the child module and reference module.app.database_hostname from the root. Child module outputs define the public values available to a caller. Verify: The root output reads the child's exported value after apply or when known. Limitation: An output can include sensitive data; do not expose secrets through ordinary outputs without deliberate protection.

Incorrect Answers

A:

This is linked to a different situation: A team uses a module from the public registry and needs to prevent unreviewed minor changes after a security assessment. There the relevant decision is: Specify a reviewed registry-module version constraint in the module block. For the question's actual requirement — A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. — the specifically relevant decision is: Declare an output in the child module and reference module.app.database_hostname from the root. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A deployment calls a reusable module with count = 3 and must reference the output of only the second instance. There the relevant decision is: Refer to the indexed module instance, such as module.worker[1].endpoint, with an appropriate count expression. For the question's actual requirement — A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. — the specifically relevant decision is: Declare an output in the child module and reference module.app.database_hostname from the root. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. There the relevant decision is: Review the intended registry release and run terraform init -upgrade after updating constraints as needed. For the question's actual requirement — A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. — the specifically relevant decision is: Declare an output in the child module and reference module.app.database_hostname from the root. It would therefore not resolve or assess the case as stated.

Question 367

A reviewer is confirming a change for the following use case: A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. The implementation follows this approach: Declare an output in the child module and reference module.app.database_hostname from the root. Which observation or acceptance test most directly verifies the intended result?

  1. Consumers can pass environment-specific inputs and receive selected outputs without editing child internals.
  2. The root output reads the child's exported value after apply or when known.
  3. The initialized module source matches the new permitted version and the resulting plan is reviewed.
  4. Initialization selects a module release satisfying the stated registry version requirement.

Explanation

Correct Answer

B:

Acceptance evidence: The root output reads the child's exported value after apply or when known. It validates the proposed action, declare an output in the child module and reference module.app.database_hostname from the root, because child module outputs define the public values available to a caller. Remaining limitation: An output can include sensitive data; do not expose secrets through ordinary outputs without deliberate protection.

Incorrect Answers

A:

This is linked to a different situation: A team is packaging a repeated VPC pattern and wants a stable interface for internal consumers. There the relevant acceptance is: Consumers can pass environment-specific inputs and receive selected outputs without editing child internals. For the question's actual requirement — A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. — the specifically relevant acceptance is: The root output reads the child's exported value after apply or when known. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A registry module release contains an urgent fix and the team's installed module is still the previous compatible release. There the relevant acceptance is: The initialized module source matches the new permitted version and the resulting plan is reviewed. For the question's actual requirement — A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. — the specifically relevant acceptance is: The root output reads the child's exported value after apply or when known. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A team uses a module from the public registry and needs to prevent unreviewed minor changes after a security assessment. There the relevant acceptance is: Initialization selects a module release satisfying the stated registry version requirement. For the question's actual requirement — A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. — the specifically relevant acceptance is: The root output reads the child's exported value after apply or when known. It would therefore not resolve or assess the case as stated.

Question 368

Consider a proposed solution for this requirement: A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. The team plans to do the following: Declare an output in the child module and reference module.app.database_hostname from the root. Which limitation or operational caveat must remain in the review?

  1. A moving branch ref does not provide the same immutability as a reviewed commit SHA.
  2. The repository must remain accessible, and the subdirectory must actually contain valid Terraform module files.
  3. An output can include sensitive data; do not expose secrets through ordinary outputs without deliberate protection.
  4. Changing count or order can affect addresses and cause unintended replacements.

Explanation

Correct Answer

C:

The limitation is an output can include sensitive data; do not expose secrets through ordinary outputs without deliberate protection. The proposed change is declare an output in the child module and reference module.app.database_hostname from the root. Validate it by checking the root output reads the child's exported value after apply or when known. Child module outputs define the public values available to a caller.

Incorrect Answers

A:

This is linked to a different situation: A private Git-sourced module has a reviewed release tag and an engineer adds version = "2.3" next to its Git source. There the relevant limitation is: A moving branch ref does not provide the same immutability as a reviewed commit SHA. For the question's actual requirement — A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. — the specifically relevant limitation is: An output can include sensitive data; do not expose secrets through ordinary outputs without deliberate protection. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. There the relevant limitation is: The repository must remain accessible, and the subdirectory must actually contain valid Terraform module files. For the question's actual requirement — A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. — the specifically relevant limitation is: An output can include sensitive data; do not expose secrets through ordinary outputs without deliberate protection. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A deployment calls a reusable module with count = 3 and must reference the output of only the second instance. There the relevant limitation is: Changing count or order can affect addresses and cause unintended replacements. For the question's actual requirement — A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. — the specifically relevant limitation is: An output can include sensitive data; do not expose secrets through ordinary outputs without deliberate protection. It would therefore not resolve or assess the case as stated.

Question 369

The team is reviewing a Terraform implementation for this case: A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Assume Terraform automatically searches every nested folder in a Git repository for a matching module name.
  2. Use a resource block's provider argument as though it were a module source URL.
  3. Expect version = "~> 2.0" to select a Git tag for an arbitrary Git module source.
  4. Reference module.app.local.database_hostname as though a child's locals were public attributes.

Explanation

Correct Answer

D:

Reject the assumption: Reference module.app.local.database_hostname as though a child's locals were public attributes. Instead, declare an output in the child module and reference module.app.database_hostname from the root. Child module outputs define the public values available to a caller. Acceptance evidence: The root output reads the child's exported value after apply or when known.

Incorrect Answers

A:

This is linked to a different situation: A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. There the relevant misconception is: Assume Terraform automatically searches every nested folder in a Git repository for a matching module name. For the question's actual requirement — A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. — the specifically relevant misconception is: Reference module.app.local.database_hostname as though a child's locals were public attributes. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A shared platform module is stored in the Terraform public registry and teams need to invoke it without copying the repository contents. There the relevant misconception is: Use a resource block's provider argument as though it were a module source URL. For the question's actual requirement — A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. — the specifically relevant misconception is: Reference module.app.local.database_hostname as though a child's locals were public attributes. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. There the relevant misconception is: Expect version = "~> 2.0" to select a Git tag for an arbitrary Git module source. For the question's actual requirement — A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. — the specifically relevant misconception is: Reference module.app.local.database_hostname as though a child's locals were public attributes. It would therefore not resolve or assess the case as stated.

Question 370

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. and Workstream B: An organization wants approved modules discoverable by many teams without copying source trees into every repo. and Workstream C: A signed-off infrastructure change has a saved plan artifact and the team needs to execute exactly that reviewed action set. Select exactly 3 actions, one addressing each distinct workstream.

  1. Set TF_LOG and TF_LOG_PATH together, collect the protected log, then disable verbose logging.
  2. Publish and consume approved modules through an HCP Terraform private module registry with reviewed versions.
  3. Declare an output in the child module and reference module.app.database_hostname from the root.
  4. Review the HCL change through version control and inspect a Terraform execution plan before authorized apply.
  5. Reference the security group resource attribute directly from the database argument.
  6. Run terraform apply release.tfplan under authorized credentials and the correct backend.

Explanation

Correct Answers

B:

For the workstream in which an organization wants approved modules discoverable by many teams without copying source trees into every repo, use this action: Publish and consume approved modules through an HCP Terraform private module registry with reviewed versions. The private registry supports controlled module distribution and reuse. Verify: Authorized workspaces resolve the approved private registry module during initialization. Limitation: Registry visibility and version release management must be governed; publishing alone does not make code correct.

C:

For the workstream in which a private application module computes a database hostname internally and a root output must expose it to the deployment pipeline, use this action: Declare an output in the child module and reference module.app.database_hostname from the root. Child module outputs define the public values available to a caller. Verify: The root output reads the child's exported value after apply or when known. Limitation: An output can include sensitive data; do not expose secrets through ordinary outputs without deliberate protection.

F:

For the workstream in which a signed-off infrastructure change has a saved plan artifact and the team needs to execute exactly that reviewed action set, use this action: Run terraform apply release.tfplan under authorized credentials and the correct backend. Applying the saved plan is the execution phase of the approved workflow. Verify: Terraform performs the saved proposed resource actions and updates state when successful. Limitation: Sensitive plan files require protection; a changed state can invalidate an old plan.

Incorrect Answers

A:

This action is appropriate instead for a different, unlisted requirement: A CI team wants to preserve Terraform debug output to a controlled file for a short-lived investigation. It would be checked by: The configured log file contains the expected Terraform diagnostics from the run. 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: An operations group wants four engineers to propose a subnet change without all four immediately modifying production. It would be checked by: A pull request includes configuration differences and a plan describing expected resource mutations. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

E:

This action is appropriate instead for a different, unlisted requirement: A database security group must be passed into a managed database resource without copying IDs into hardcoded variables. It would be checked by: Terraform's graph records the dependency and plans the database with the correct group identifier. 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.