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 36

Question 350

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A security group module lives in the local modules/security directory of the same versioned repository. and Workstream B: A workstation has Terraform CLI installed but a team wants the local CLI to invoke HCP Terraform remote runs and manage state. and Workstream C: A commit is syntactically valid HCL but includes a resource argument not supported by the installed provider schema. Select exactly 3 actions, one addressing each distinct workstream.

  1. Use terraform validate against initialized providers to catch unsupported or missing arguments.
  2. Reference the local path with source = "./modules/security" inside the module block.
  3. Define a resource postcondition that validates the resulting endpoint before dependent resources proceed.
  4. Reuse one reviewed Terraform module with explicit environment inputs instead of independently editing each deployment.
  5. Configure a valid cloud block for the organization/workspace and authenticate with terraform login.
  6. Select suitable Azure and monitoring providers and declare both systems through one Terraform root module.

Explanation

Correct Answers

A:

For the workstream in which a commit is syntactically valid HCL but includes a resource argument not supported by the installed provider schema, use this action: Use terraform validate against initialized providers to catch unsupported or missing arguments. Validate uses provider schemas and Terraform's configuration rules where possible. Verify: Validation reports schema errors without making changes to remote infrastructure. Limitation: An input variable's unknown runtime value may prevent validation from deciding every plan-time expression.

B:

For the workstream in which a security group module lives in the local modules/security directory of the same versioned repository, use this action: Reference the local path with source = "./modules/security" inside the module block. Local module sources use a filesystem path and share the containing repository's version-control lifecycle. Verify: Terraform reads the local child module without fetching it from a remote registry. Limitation: A local path module is not versioned by the module block's version argument.

E:

For the workstream in which a workstation has Terraform CLI installed but a team wants the local CLI to invoke HCP Terraform remote runs and manage state, use this action: Configure a valid cloud block for the organization/workspace and authenticate with terraform login. Cloud integration associates the root module with managed HCP Terraform workspaces. Verify: The CLI connects to the HCP workspace and follows its selected remote execution and state workflow. Limitation: The working directory cannot combine cloud and backend blocks, and authentication remains required.

Incorrect Answers

C:

This action is appropriate instead for a different, unlisted requirement: A managed service should not continue to downstream provisioning if the returned endpoint has an invalid structure. It would be checked by: A failing postcondition signals an error and prevents downstream dependent actions. 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: Two branches of a retailer deploy similar staging clusters, but each hand-built cluster gradually acquires different firewall rules. It would be checked by: Review version-control diffs and compare planned firewall changes for both environments. 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 company uses Azure for application workloads and a SaaS provider for monitoring, and wants to avoid managing two separate IaC languages. It would be checked by: Plan output contains the cloud deployment and monitoring integrations with clear provider ownership. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

Question 351

An infrastructure team faces this specific situation: An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. Which Terraform action most directly satisfies the requirement?

  1. Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials.
  2. Use for_each on the module block and reference module.stack["test"].endpoint.
  3. Create a child module with declared input variables, resource blocks, and output values, then invoke it from a root module.
  4. Treat each module call as a distinct instance with its own passed inputs and resource addresses.

Explanation

Correct Answer

A:

Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials. Terraform can fetch VCS modules by source address and Git ref, but source type controls version selection. Verify: Initialization checks out the intended Git module revision and the plan uses its configuration. Limitation: Git source refs and the registry module version argument are different mechanisms.

Incorrect Answers

B:

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 — An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. — the specifically relevant decision is: Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials. It would therefore not resolve or assess the case as stated.

C:

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 decision is: Create a child module with declared input variables, resource blocks, and output values, then invoke it from a root module. For the question's actual requirement — An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. — the specifically relevant decision is: Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: Two module instances share the same source but have different input maps, and an engineer expects identical endpoint addresses. There the relevant decision is: Treat each module call as a distinct instance with its own passed inputs and resource addresses. For the question's actual requirement — An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. — the specifically relevant decision is: Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials. It would therefore not resolve or assess the case as stated.

Question 352

A reviewer is confirming a change for the following use case: An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. The implementation follows this approach: Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials. Which observation or acceptance test most directly verifies the intended result?

  1. Initialization checks out the intended Git module revision and the plan uses its configuration.
  2. The keyed module instance exposes only the test environment's selected output.
  3. The child's plan uses the two exact provider instances rather than silently defaulting to one region.
  4. Planning resolves the child's environment value from the explicit module call.

Explanation

Correct Answer

A:

Acceptance evidence: Initialization checks out the intended Git module revision and the plan uses its configuration. It validates the proposed action, use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials, because terraform can fetch VCS modules by source address and Git ref, but source type controls version selection. Remaining limitation: Git source refs and the registry module version argument are different mechanisms.

Incorrect Answers

B:

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 acceptance is: The keyed module instance exposes only the test environment's selected output. For the question's actual requirement — An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. — the specifically relevant acceptance is: Initialization checks out the intended Git module revision and the plan uses its configuration. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A child module must receive two non-default provider aliases for cross-region VPN creation. There the relevant acceptance is: The child's plan uses the two exact provider instances rather than silently defaulting to one region. For the question's actual requirement — An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. — the specifically relevant acceptance is: Initialization checks out the intended Git module revision and the plan uses its configuration. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. There the relevant acceptance is: Planning resolves the child's environment value from the explicit module call. For the question's actual requirement — An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. — the specifically relevant acceptance is: Initialization checks out the intended Git module revision and the plan uses its configuration. It would therefore not resolve or assess the case as stated.

Question 353

Consider a proposed solution for this requirement: An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. The team plans to do the following: Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials. Which limitation or operational caveat must remain in the review?

  1. Git source refs and the registry module version argument are different mechanisms.
  2. Registry-module versions are separate from provider lock-file selections and Terraform CLI versions.
  3. An alias without a corresponding provider mapping is not inherited automatically.
  4. Renaming the test key is an address change unless state moves are handled.

Explanation

Correct Answer

A:

The limitation is git source refs and the registry module version argument are different mechanisms. The proposed change is use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials. Validate it by checking initialization checks out the intended Git module revision and the plan uses its configuration. Terraform can fetch VCS modules by source address and Git ref, but source type controls version selection.

Incorrect Answers

B:

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 limitation is: Registry-module versions are separate from provider lock-file selections and Terraform CLI versions. For the question's actual requirement — An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. — the specifically relevant limitation is: Git source refs and the registry module version argument are different mechanisms. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A child module must receive two non-default provider aliases for cross-region VPN creation. There the relevant limitation is: An alias without a corresponding provider mapping is not inherited automatically. For the question's actual requirement — An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. — the specifically relevant limitation is: Git source refs and the registry module version argument are different mechanisms. It would therefore not resolve or assess the case as stated.

D:

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 — An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. — the specifically relevant limitation is: Git source refs and the registry module version argument are different mechanisms. It would therefore not resolve or assess the case as stated.

Question 354

The team is reviewing a Terraform implementation for this case: An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Expect version = "~> 2.0" to select a Git tag for an arbitrary Git module source.
  2. Copy all root-level provider credential blocks inside the reusable child module for each consumer.
  3. Add provider blocks inside the modern reusable child just to bypass passing aliases.
  4. Assume every variable declared in the root is directly accessible inside all child directories.

Explanation

Correct Answer

A:

Reject the assumption: Expect version = "~> 2.0" to select a Git tag for an arbitrary Git module source. Instead, use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials. Terraform can fetch VCS modules by source address and Git ref, but source type controls version selection. Acceptance evidence: Initialization checks out the intended Git module revision and the plan uses its configuration.

Incorrect Answers

B:

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 misconception is: Copy all root-level provider credential blocks inside the reusable child module for each consumer. For the question's actual requirement — An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. — the specifically relevant misconception is: Expect version = "~> 2.0" to select a Git tag for an arbitrary Git module source. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A child module must receive two non-default provider aliases for cross-region VPN creation. There the relevant misconception is: Add provider blocks inside the modern reusable child just to bypass passing aliases. For the question's actual requirement — An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. — the specifically relevant misconception is: Expect version = "~> 2.0" to select a Git tag for an arbitrary Git module source. It would therefore not resolve or assess the case as stated.

D:

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

Question 355

A Terraform platform team is coordinating 2 independent decisions. Workstream A: An infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module. and Workstream B: A governance team wants to prevent deployments of cloud resources that violate a mandatory tagging policy after plan evaluation. Select exactly 2 actions, one addressing each distinct workstream.

  1. Use terraform state list to enumerate addresses in the selected state.
  2. Import the existing bucket into an appropriate resource address after writing matching configuration.
  3. Attach an appropriate policy set to relevant HCP workspaces and configure an enforcement level that blocks noncompliant applies.
  4. Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials.
  5. Reference the security group resource attribute directly from the database argument.

Explanation

Correct Answers

C:

For the workstream in which a governance team wants to prevent deployments of cloud resources that violate a mandatory tagging policy after plan evaluation, use this action: Attach an appropriate policy set to relevant HCP workspaces and configure an enforcement level that blocks noncompliant applies. HCP policy sets integrate governance checks into the run workflow. Verify: A test run violating the rule is stopped at policy evaluation unless an explicitly permitted override applies. Limitation: Policy scope, policy language, and override semantics must be understood for the organization.

D:

For the workstream in which an infrastructure module is checked out from a private Git repository at a reviewed branch or tag, not published as a registry module, use this action: Use a valid git:: module source and an appropriate immutable reviewed ref, with the necessary credentials. Terraform can fetch VCS modules by source address and Git ref, but source type controls version selection. Verify: Initialization checks out the intended Git module revision and the plan uses its configuration. Limitation: Git source refs and the registry module version argument are different mechanisms.

Incorrect Answers

A:

This option addresses a separate requirement: A release engineer needs the resource addresses Terraform currently manages without printing secrets from state. Evidence for that other requirement would be the command outputs the expected resource instance addresses for further inspection; neither listed workstream asks for it.

B:

This option addresses a separate requirement: A storage bucket exists in the cloud, but Terraform proposes creating another bucket with the intended name because its state has no binding. Evidence for that other requirement would be the state lists the imported address, and a subsequent plan can be evaluated for unintended differences; neither listed workstream asks for it.

E:

This option addresses a separate requirement: A database security group must be passed into a managed database resource without copying IDs into hardcoded variables. Evidence for that other requirement would be terraform's graph records the dependency and plans the database with the correct group identifier; neither listed workstream asks for it.

Question 356

An infrastructure team faces this specific situation: A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. Which Terraform action most directly satisfies the requirement?

  1. Create a child module with declared input variables, resource blocks, and output values, then invoke it from a root module.
  2. Treat each module call as a distinct instance with its own passed inputs and resource addresses.
  3. Specify the Git module source with the double-slash subdirectory syntax after the repository path.
  4. Choose an explicit Git ref in the source URL rather than the registry-specific module version argument.

Explanation

Correct Answer

C:

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.

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 decision is: Create a child module with declared input variables, resource blocks, and output values, then invoke it from a root module. For the question's actual requirement — A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. — the specifically relevant decision is: Specify the Git module source with the double-slash subdirectory syntax after the repository path. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: Two module instances share the same source but have different input maps, and an engineer expects identical endpoint addresses. There the relevant decision is: Treat each module call as a distinct instance with its own passed inputs and resource addresses. For the question's actual requirement — A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. — the specifically relevant decision is: Specify the Git module source with the double-slash subdirectory syntax after the repository path. 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 decision is: Choose an explicit Git ref in the source URL rather than the registry-specific module version argument. For the question's actual requirement — A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. — the specifically relevant decision is: Specify the Git module source with the double-slash subdirectory syntax after the repository path. It would therefore not resolve or assess the case as stated.

Question 357

A reviewer is confirming a change for the following use case: A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. The implementation follows this approach: Specify the Git module source with the double-slash subdirectory syntax after the repository path. Which observation or acceptance test most directly verifies the intended result?

  1. Initialization loads only the intended child configuration rooted at the named subdirectory.
  2. Planning resolves the child's environment value from the explicit module call.
  3. The root output reads the child's exported value after apply or when known.
  4. Terraform downloads the module code at the intended Git tag or commit during init.

Explanation

Correct Answer

A:

Acceptance evidence: Initialization loads only the intended child configuration rooted at the named subdirectory. It validates the proposed action, specify the Git module source with the double-slash subdirectory syntax after the repository path, because module source syntax can identify both a remote package and its internal module subdirectory. Remaining limitation: The repository must remain accessible, and the subdirectory must actually contain valid Terraform module files.

Incorrect Answers

B:

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

C:

This is linked to a different situation: A private application module computes a database hostname internally and a root output must expose it to the deployment pipeline. There the relevant acceptance is: The root output reads the child's exported value after apply or when known. For the question's actual requirement — A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. — the specifically relevant acceptance is: Initialization loads only the intended child configuration rooted at the named subdirectory. 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 acceptance is: Terraform downloads the module code at the intended Git tag or commit during init. For the question's actual requirement — A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. — the specifically relevant acceptance is: Initialization loads only the intended child configuration rooted at the named subdirectory. It would therefore not resolve or assess the case as stated.

Question 358

Consider a proposed solution for this requirement: A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. The team plans to do the following: Specify the Git module source with the double-slash subdirectory syntax after the repository path. Which limitation or operational caveat must remain in the review?

  1. Input variables are scoped to each module and do not implicitly leak across module boundaries.
  2. A moving branch ref does not provide the same immutability as a reviewed commit SHA.
  3. Changing count or order can affect addresses and cause unintended replacements.
  4. The repository must remain accessible, and the subdirectory must actually contain valid Terraform module files.

Explanation

Correct Answer

D:

The limitation is the repository must remain accessible, and the subdirectory must actually contain valid Terraform module files. The proposed change is specify the Git module source with the double-slash subdirectory syntax after the repository path. Validate it by checking initialization loads only the intended child configuration rooted at the named subdirectory. Module source syntax can identify both a remote package and its internal module subdirectory.

Incorrect Answers

A:

This is linked to a different situation: A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. There the relevant limitation is: Input variables are scoped to each module and do not implicitly leak across module boundaries. For the question's actual requirement — A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. — the specifically relevant limitation is: The repository must remain accessible, and the subdirectory must actually contain valid Terraform module files. 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 limitation is: A moving branch ref does not provide the same immutability as a reviewed commit SHA. For the question's actual requirement — A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. — the specifically relevant limitation is: The repository must remain accessible, and the subdirectory must actually contain valid Terraform module files. 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 limitation is: Changing count or order can affect addresses and cause unintended replacements. For the question's actual requirement — A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. — the specifically relevant limitation is: The repository must remain accessible, and the subdirectory must actually contain valid Terraform module files. It would therefore not resolve or assess the case as stated.

Question 359

The team is reviewing a Terraform implementation for this case: A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. 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. Delete the Terraform state to force the new module to be installed.
  3. Assume a shared module directory always maps both calls to the same real resource.
  4. Assume Terraform automatically searches every nested folder in a Git repository for a matching module name.

Explanation

Correct Answer

D:

Reject the assumption: Assume Terraform automatically searches every nested folder in a Git repository for a matching module name. Instead, 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. Acceptance evidence: Initialization loads only the intended child configuration rooted at the named subdirectory.

Incorrect Answers

A:

This is linked to a different situation: A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. There the relevant misconception is: Assume every variable declared in the root is directly accessible inside all child directories. For the question's actual requirement — A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. — the specifically relevant misconception is: Assume Terraform automatically searches every nested folder in a Git repository for a matching module name. It would therefore not resolve or assess the case as stated.

B:

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 monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. — the specifically relevant misconception is: Assume Terraform automatically searches every nested folder in a Git repository for a matching module name. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: Two module instances share the same source but have different input maps, and an engineer expects identical endpoint addresses. There the relevant misconception is: Assume a shared module directory always maps both calls to the same real resource. For the question's actual requirement — A monorepo contains a reusable module within a subdirectory of a Git repository, and Terraform currently downloads the wrong root folder. — the specifically relevant misconception is: Assume Terraform automatically searches every nested folder in a Git repository for a matching module name. It would therefore not resolve or assess the case as stated.

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.

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.