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 47

Question 460

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A migration changes a backend location but the team must preserve all existing state bindings. and Workstream B: A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. and Workstream C: A developer defines a subnet inventory in which every subnet has cidr, zone, and public attributes, and needs reliable shape checking. Select exactly 3 actions, one addressing each distinct workstream.

  1. Set provider = aws.secondary on that resource, referencing the aliased provider configuration.
  2. Use the cloud integration block for workspace mapping and authenticate with terraform login securely.
  3. Create an HCP Terraform workspace and configure an appropriate remote execution workflow with secure credentials.
  4. Use terraform show -json on the state or saved plan with proper access controls.
  5. Back up the current state and use terraform init -migrate-state when moving to the newly configured backend.
  6. Use an object type constraint within a map or list collection with named attribute types.

Explanation

Correct Answers

A:

For the workstream in which a configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region, use this action: Set provider = aws.secondary on that resource, referencing the aliased provider configuration. Explicit provider selection lets a resource use a non-default provider configuration. Verify: The planned resource address resolves through the secondary provider while unqualified resources use the default. Limitation: Alias names are Terraform-local configuration references, not separate plugin versions.

E:

For the workstream in which a migration changes a backend location but the team must preserve all existing state bindings, use this action: Back up the current state and use terraform init -migrate-state when moving to the newly configured backend. Backend migration must transfer the existing state, not simply change where Terraform searches for it. Verify: The destination backend reflects the prior managed resource addresses and lineage after migration. Limitation: Misconfigured credentials or failed migration should block an apply rather than trigger new resource creation.

F:

For the workstream in which a developer defines a subnet inventory in which every subnet has cidr, zone, and public attributes, and needs reliable shape checking, use this action: Use an object type constraint within a map or list collection with named attribute types. Structured type constraints describe expected nested data and improve module interfaces. Verify: Invalid records with wrong attribute types fail validation rather than causing obscure downstream errors. Limitation: An object type is not interchangeable with any arbitrary map if its declared attributes differ.

Incorrect Answers

B:

This action is appropriate instead for a different, unlisted requirement: A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. It would be checked by: CLI commands authenticate to the correct HCP organization/workspace and work with managed remote state. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

C:

This action is appropriate instead for a different, unlisted requirement: A small team needs managed Terraform state and remotely executed infrastructure runs with shared visibility rather than running only from laptops. It would be checked by: Plans and applies run under the HCP workspace and its state versions are centrally accessible to authorized users. 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 engineer wants a machine-readable view of the current Terraform state while building an inventory report. It would be checked by: The JSON structure can be parsed for relevant addresses and outputs by authorized tooling. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

Question 461

An infrastructure team faces this specific situation: An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. Which Terraform action most directly satisfies the requirement?

  1. Interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration.
  2. Declare one backend block inside terraform and reinitialize the working directory.
  3. Select the appropriate HCP Terraform cloud integration and remove the conflicting backend declaration.
  4. Check the exact backend's current locking configuration and version-specific requirements before assuming locks work.

Explanation

Correct Answer

A:

Interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration. Refreshing known remote objects exposes differences between actual and declared desired state. Verify: The reviewed plan explains which observed remote attributes differ from desired HCL. Limitation: Not every remote change is actionable drift; provider-computed attributes and intentional shared ownership need consideration.

Incorrect Answers

B:

This is linked to a different situation: A new environment needs to save state in a specific shared backend, and the team attempts to write backend settings under a resource block. There the relevant decision is: Declare one backend block inside terraform and reinitialize the working directory. For the question's actual requirement — An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. — the specifically relevant decision is: Interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A Terraform configuration contains both a cloud block and a backend block while planning to use HCP Terraform remote execution. There the relevant decision is: Select the appropriate HCP Terraform cloud integration and remove the conflicting backend declaration. For the question's actual requirement — An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. — the specifically relevant decision is: Interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: An engineer asks whether selecting an S3 bucket as remote storage automatically guarantees supported state locking under every Terraform/backend version. There the relevant decision is: Check the exact backend's current locking configuration and version-specific requirements before assuming locks work. For the question's actual requirement — An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. — the specifically relevant decision is: Interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration. It would therefore not resolve or assess the case as stated.

Question 462

A reviewer is confirming a change for the following use case: An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. The implementation follows this approach: Interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration. Which observation or acceptance test most directly verifies the intended result?

  1. The reviewed plan explains which observed remote attributes differ from desired HCL.
  2. State operations resume without releasing a lock held by an active independent job.
  3. The destination backend reflects the prior managed resource addresses and lineage after migration.
  4. Multiple team members read one central state snapshot and serialized operations when the backend supports locking.

Explanation

Correct Answer

A:

Acceptance evidence: The reviewed plan explains which observed remote attributes differ from desired HCL. It validates the proposed action, interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration, because refreshing known remote objects exposes differences between actual and declared desired state. Remaining limitation: Not every remote change is actionable drift; provider-computed attributes and intentional shared ownership need consideration.

Incorrect Answers

B:

This is linked to a different situation: A Terraform job crashed and left a stale lock, but the team has not verified whether any other run is active. There the relevant acceptance is: State operations resume without releasing a lock held by an active independent job. For the question's actual requirement — An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. — the specifically relevant acceptance is: The reviewed plan explains which observed remote attributes differ from desired HCL. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A migration changes a backend location but the team must preserve all existing state bindings. There the relevant acceptance is: The destination backend reflects the prior managed resource addresses and lineage after migration. For the question's actual requirement — An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. — the specifically relevant acceptance is: The reviewed plan explains which observed remote attributes differ from desired HCL. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A team's state file is stored on a laptop and must be shared across several engineers without copying it manually after every change. There the relevant acceptance is: Multiple team members read one central state snapshot and serialized operations when the backend supports locking. For the question's actual requirement — An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. — the specifically relevant acceptance is: The reviewed plan explains which observed remote attributes differ from desired HCL. It would therefore not resolve or assess the case as stated.

Question 463

Consider a proposed solution for this requirement: An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. The team plans to do the following: Interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration. Which limitation or operational caveat must remain in the review?

  1. Backend configuration data can be captured in local initialization metadata and plan files.
  2. Migrating existing state to cloud-managed workspaces needs a controlled review and backup.
  3. Locking support depends on backend type; disabling locks invites state corruption.
  4. Not every remote change is actionable drift; provider-computed attributes and intentional shared ownership need consideration.

Explanation

Correct Answer

D:

The limitation is not every remote change is actionable drift; provider-computed attributes and intentional shared ownership need consideration. The proposed change is interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration. Validate it by checking the reviewed plan explains which observed remote attributes differ from desired HCL. Refreshing known remote objects exposes differences between actual and declared desired state.

Incorrect Answers

A:

This is linked to a different situation: A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. There the relevant limitation is: Backend configuration data can be captured in local initialization metadata and plan files. For the question's actual requirement — An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. — the specifically relevant limitation is: Not every remote change is actionable drift; provider-computed attributes and intentional shared ownership need consideration. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A Terraform configuration contains both a cloud block and a backend block while planning to use HCP Terraform remote execution. There the relevant limitation is: Migrating existing state to cloud-managed workspaces needs a controlled review and backup. For the question's actual requirement — An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. — the specifically relevant limitation is: Not every remote change is actionable drift; provider-computed attributes and intentional shared ownership need consideration. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: Two release pipelines try to update the same remote state simultaneously and one sees a lock-acquisition failure. There the relevant limitation is: Locking support depends on backend type; disabling locks invites state corruption. For the question's actual requirement — An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. — the specifically relevant limitation is: Not every remote change is actionable drift; provider-computed attributes and intentional shared ownership need consideration. It would therefore not resolve or assess the case as stated.

Question 464

The team is reviewing a Terraform implementation for this case: An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Assume the word remote guarantees every backend acquires a lock for every state write.
  2. Retry with -lock=false while the other pipeline is actively writing the same state.
  3. Use terraform init -reconfigure as if it always copies state to a new backend.
  4. Assume unchanged Terraform files imply remote infrastructure cannot drift.

Explanation

Correct Answer

D:

Reject the assumption: Assume unchanged Terraform files imply remote infrastructure cannot drift. Instead, interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration. Refreshing known remote objects exposes differences between actual and declared desired state. Acceptance evidence: The reviewed plan explains which observed remote attributes differ from desired HCL.

Incorrect Answers

A:

This is linked to a different situation: An engineer asks whether selecting an S3 bucket as remote storage automatically guarantees supported state locking under every Terraform/backend version. There the relevant misconception is: Assume the word remote guarantees every backend acquires a lock for every state write. For the question's actual requirement — An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. — the specifically relevant misconception is: Assume unchanged Terraform files imply remote infrastructure cannot drift. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: Two release pipelines try to update the same remote state simultaneously and one sees a lock-acquisition failure. There the relevant misconception is: Retry with -lock=false while the other pipeline is actively writing the same state. For the question's actual requirement — An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. — the specifically relevant misconception is: Assume unchanged Terraform files imply remote infrastructure cannot drift. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A migration changes a backend location but the team must preserve all existing state bindings. There the relevant misconception is: Use terraform init -reconfigure as if it always copies state to a new backend. For the question's actual requirement — An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. — the specifically relevant misconception is: Assume unchanged Terraform files imply remote infrastructure cannot drift. It would therefore not resolve or assess the case as stated.

Question 465

A Terraform platform team is coordinating 2 independent decisions. Workstream A: An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. and Workstream B: A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. Select exactly 2 actions, one addressing each distinct workstream.

  1. Run terraform plan with normal refresh behavior and inspect drift-driven proposed updates.
  2. Use a Terraform root module that explicitly declares tracked resources and reconcile it through Terraform state.
  3. Use the provider's supported environment or workload identity authentication mechanism rather than embedding credential literals.
  4. Read or pass credentials with an approved Vault integration and secure runtime identity, applying ephemeral/write-only protections where supported.
  5. Interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration.

Explanation

Correct Answers

C:

For the workstream in which a newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files, use this action: Use the provider's supported environment or workload identity authentication mechanism rather than embedding credential literals. Providers manage their own API connections; secure credential sourcing is separate from Terraform's HCL syntax. Verify: The provider authenticates through the supported runtime identity without secrets appearing in committed configuration. Limitation: The exact environment variable or identity mechanism is provider-specific and must be checked in its documentation.

E:

For the workstream in which an operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed, use this action: Interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration. Refreshing known remote objects exposes differences between actual and declared desired state. Verify: The reviewed plan explains which observed remote attributes differ from desired HCL. Limitation: Not every remote change is actionable drift; provider-computed attributes and intentional shared ownership need consideration.

Incorrect Answers

A:

This option addresses a separate requirement: A finance system's VPC has been manually changed outside Terraform and a release manager wants a preview of reconciliation. Evidence for that other requirement would be the plan compares refreshed remote objects and current state against desired configuration; neither listed workstream asks for it.

B:

This option addresses a separate requirement: An audit team asks whether applying a YAML-looking file automatically turns ad hoc server purchases into managed infrastructure. Evidence for that other requirement would be the plan and state distinguish managed resource instances from unmanaged manual purchases; neither listed workstream asks for it.

D:

This option addresses a separate requirement: A company rotates application credentials in Vault and wants Terraform pipelines to avoid checking decrypted secrets into source control. Evidence for that other requirement would be version-controlled HCL contains no hardcoded cleartext credential and the approved secret path is resolvable at runtime; neither listed workstream asks for it.

Question 466

An infrastructure team faces this specific situation: A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. Which Terraform action most directly satisfies the requirement?

  1. Ignore .terraform and protect state while committing the intended HCL and provider dependency lock file.
  2. Use an appropriate moved block to preserve the instance's state address during the refactor.
  3. Declare one backend block inside terraform and reinitialize the working directory.
  4. Use supported environment-based backend credentials or identity rather than embedding credentials in backend configuration.

Explanation

Correct Answer

B:

Use an appropriate moved block to preserve the instance's state address during the refactor. A moved block records intentional resource address changes while preserving managed object identity. Verify: The plan reports an address move instead of unnecessary destruction and recreation. Limitation: Moved blocks need correct old/new addresses and should be reviewed for concurrent changes.

Incorrect Answers

A:

This is linked to a different situation: An engineer wants to commit the local .terraform directory to source control because it contains provider caches and backend settings. There the relevant decision is: Ignore .terraform and protect state while committing the intended HCL and provider dependency lock file. For the question's actual requirement — A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. — the specifically relevant decision is: Use an appropriate moved block to preserve the instance's state address during the refactor. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A new environment needs to save state in a specific shared backend, and the team attempts to write backend settings under a resource block. There the relevant decision is: Declare one backend block inside terraform and reinitialize the working directory. For the question's actual requirement — A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. — the specifically relevant decision is: Use an appropriate moved block to preserve the instance's state address during the refactor. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. There the relevant decision is: Use supported environment-based backend credentials or identity rather than embedding credentials in backend configuration. For the question's actual requirement — A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. — the specifically relevant decision is: Use an appropriate moved block to preserve the instance's state address during the refactor. It would therefore not resolve or assess the case as stated.

Question 467

A reviewer is confirming a change for the following use case: A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. The implementation follows this approach: Use an appropriate moved block to preserve the instance's state address during the refactor. Which observation or acceptance test most directly verifies the intended result?

  1. Backend initialization succeeds without static access keys embedded in .terraform or saved plan artifacts.
  2. A controlled test or backend documentation confirms a lock is obtained for state-mutating operations.
  3. The plan reports an address move instead of unnecessary destruction and recreation.
  4. Initialization uses the configured HCP organization and workspace association without a second backend block.

Explanation

Correct Answer

C:

Acceptance evidence: The plan reports an address move instead of unnecessary destruction and recreation. It validates the proposed action, use an appropriate moved block to preserve the instance's state address during the refactor, because a moved block records intentional resource address changes while preserving managed object identity. Remaining limitation: Moved blocks need correct old/new addresses and should be reviewed for concurrent changes.

Incorrect Answers

A:

This is linked to a different situation: A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. There the relevant acceptance is: Backend initialization succeeds without static access keys embedded in .terraform or saved plan artifacts. For the question's actual requirement — A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. — the specifically relevant acceptance is: The plan reports an address move instead of unnecessary destruction and recreation. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: An engineer asks whether selecting an S3 bucket as remote storage automatically guarantees supported state locking under every Terraform/backend version. There the relevant acceptance is: A controlled test or backend documentation confirms a lock is obtained for state-mutating operations. For the question's actual requirement — A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. — the specifically relevant acceptance is: The plan reports an address move instead of unnecessary destruction and recreation. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A Terraform configuration contains both a cloud block and a backend block while planning to use HCP Terraform remote execution. There the relevant acceptance is: Initialization uses the configured HCP organization and workspace association without a second backend block. For the question's actual requirement — A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. — the specifically relevant acceptance is: The plan reports an address move instead of unnecessary destruction and recreation. It would therefore not resolve or assess the case as stated.

Question 468

Consider a proposed solution for this requirement: A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. The team plans to do the following: Use an appropriate moved block to preserve the instance's state address during the refactor. Which limitation or operational caveat must remain in the review?

  1. Misconfigured credentials or failed migration should block an apply rather than trigger new resource creation.
  2. Moved blocks need correct old/new addresses and should be reviewed for concurrent changes.
  3. Remote storage is only as safe as its access policy, encryption, versioning, and locking support.
  4. Migrating existing state to cloud-managed workspaces needs a controlled review and backup.

Explanation

Correct Answer

B:

The limitation is moved blocks need correct old/new addresses and should be reviewed for concurrent changes. The proposed change is use an appropriate moved block to preserve the instance's state address during the refactor. Validate it by checking the plan reports an address move instead of unnecessary destruction and recreation. A moved block records intentional resource address changes while preserving managed object identity.

Incorrect Answers

A:

This is linked to a different situation: A migration changes a backend location but the team must preserve all existing state bindings. There the relevant limitation is: Misconfigured credentials or failed migration should block an apply rather than trigger new resource creation. For the question's actual requirement — A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. — the specifically relevant limitation is: Moved blocks need correct old/new addresses and should be reviewed for concurrent changes. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A team's state file is stored on a laptop and must be shared across several engineers without copying it manually after every change. There the relevant limitation is: Remote storage is only as safe as its access policy, encryption, versioning, and locking support. For the question's actual requirement — A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. — the specifically relevant limitation is: Moved blocks need correct old/new addresses and should be reviewed for concurrent changes. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A Terraform configuration contains both a cloud block and a backend block while planning to use HCP Terraform remote execution. There the relevant limitation is: Migrating existing state to cloud-managed workspaces needs a controlled review and backup. For the question's actual requirement — A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. — the specifically relevant limitation is: Moved blocks need correct old/new addresses and should be reviewed for concurrent changes. It would therefore not resolve or assess the case as stated.

Question 469

The team is reviewing a Terraform implementation for this case: A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Force-unlock any visible lock immediately without identifying its owner or active job.
  2. Keep separate laptop-local states and manually merge their JSON content after each apply.
  3. Delete the prior resource block and assume Terraform automatically knows a new resource name is equivalent.
  4. Assume command-line -backend-config secrets are never preserved after initialization.

Explanation

Correct Answer

C:

Reject the assumption: Delete the prior resource block and assume Terraform automatically knows a new resource name is equivalent. Instead, use an appropriate moved block to preserve the instance's state address during the refactor. A moved block records intentional resource address changes while preserving managed object identity. Acceptance evidence: The plan reports an address move instead of unnecessary destruction and recreation.

Incorrect Answers

A:

This is linked to a different situation: A Terraform job crashed and left a stale lock, but the team has not verified whether any other run is active. There the relevant misconception is: Force-unlock any visible lock immediately without identifying its owner or active job. For the question's actual requirement — A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. — the specifically relevant misconception is: Delete the prior resource block and assume Terraform automatically knows a new resource name is equivalent. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A team's state file is stored on a laptop and must be shared across several engineers without copying it manually after every change. There the relevant misconception is: Keep separate laptop-local states and manually merge their JSON content after each apply. For the question's actual requirement — A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. — the specifically relevant misconception is: Delete the prior resource block and assume Terraform automatically knows a new resource name is equivalent. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A security review finds AWS access keys passed in -backend-config and wants to reduce secret persistence in initialization files. There the relevant misconception is: Assume command-line -backend-config secrets are never preserved after initialization. For the question's actual requirement — A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. — the specifically relevant misconception is: Delete the prior resource block and assume Terraform automatically knows a new resource name is equivalent. It would therefore not resolve or assess the case as stated.

Question 470

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM. and Workstream B: An infrastructure release creates AWS resources in two regions, with a disaster-recovery instance explicitly assigned to the second region. and Workstream C: A module emits an ordered list of three subnet IDs aligned with ordered availability zones and consumers depend on position. Select exactly 3 actions, one addressing each distinct workstream.

  1. Treat each module call as a distinct instance with its own passed inputs and resource addresses.
  2. Create a child module with declared input variables, resource blocks, and output values, then invoke it from a root module.
  3. Configure default and aliased AWS providers and assign the disaster-recovery resource to the alias.
  4. Use a list(string) or tuple with explicit ordering semantics rather than a set.
  5. Use an appropriate moved block to preserve the instance's state address during the refactor.
  6. Keep one authoritative managed address per remote object and refactor references accordingly.

Explanation

Correct Answers

C:

For the workstream in which an infrastructure release creates AWS resources in two regions, with a disaster-recovery instance explicitly assigned to the second region, use this action: Configure default and aliased AWS providers and assign the disaster-recovery resource to the alias. Multiple provider configurations allow one plugin to manage distinct endpoints or regions. Verify: The plan identifies primary and recovery resources using the intended regional provider instances. Limitation: Resources cannot infer an alias from a tag or name; it must be referenced by Terraform configuration.

D:

For the workstream in which a module emits an ordered list of three subnet IDs aligned with ordered availability zones and consumers depend on position, use this action: Use a list(string) or tuple with explicit ordering semantics rather than a set. List and tuple values preserve positional meaning; sets do not. Verify: The first, second, and third output elements correspond to documented ordered subnet assignments. Limitation: Order-sensitive outputs should not be built from unordered map iteration without intentional sorting.

E:

For the workstream in which a resource was renamed from aws_instance.app to aws_instance.frontend in HCL, but it is the same underlying VM, use this action: Use an appropriate moved block to preserve the instance's state address during the refactor. A moved block records intentional resource address changes while preserving managed object identity. Verify: The plan reports an address move instead of unnecessary destruction and recreation. Limitation: Moved blocks need correct old/new addresses and should be reviewed for concurrent changes.

Incorrect Answers

A:

This action is appropriate instead for a different, unlisted requirement: Two module instances share the same source but have different input maps, and an engineer expects identical endpoint addresses. It would be checked by: The plan displays separate module.alpha and module.beta resource addresses with their respective values. 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 team is packaging a repeated VPC pattern and wants a stable interface for internal consumers. It would be checked by: Consumers can pass environment-specific inputs and receive selected outputs without editing child internals. 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: An engineer is importing one cloud instance but attempts to assign the same remote object to two Terraform resource addresses. It would be checked by: State inspection shows the imported instance at a single intended address. 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.