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 6

Question 50

A Terraform platform team is coordinating 3 independent decisions. Workstream A: An engineer thinks the provider block installs the AWS provider and a resource block selects the AWS account by itself. and Workstream B: A developer defines a subnet inventory in which every subnet has cidr, zone, and public attributes, and needs reliable shape checking. and Workstream C: A Terraform job crashed and left a stale lock, but the team has not verified whether any other run is active. Select exactly 3 actions, one addressing each distinct workstream.

  1. Review the intended registry release and run terraform init -upgrade after updating constraints as needed.
  2. Confirm there is no current state writer, then use force-unlock only for the team's own stale lock ID.
  3. Run terraform plan -detailed-exitcode and interpret 0 as no changes, 2 as changes, and 1 as error.
  4. Use an object type constraint within a map or list collection with named attribute types.
  5. Declare installation metadata in required_providers and put operational region or endpoint settings in provider configuration.
  6. Run a speculative terraform plan with the desired inputs and examine its proposed changes.

Explanation

Correct Answers

B:

For the workstream in which a Terraform job crashed and left a stale lock, but the team has not verified whether any other run is active, use this action: Confirm there is no current state writer, then use force-unlock only for the team's own stale lock ID. Force-unlock is a recovery tool for stale locks, not a substitute for concurrency coordination. Verify: State operations resume without releasing a lock held by an active independent job. Limitation: Force unlocking a live operation can permit multiple writers and corrupt state.

D:

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.

E:

For the workstream in which an engineer thinks the provider block installs the AWS provider and a resource block selects the AWS account by itself, use this action: Declare installation metadata in required_providers and put operational region or endpoint settings in provider configuration. Provider requirements and provider configuration have separate responsibilities. Verify: Init obtains the required plugin; plan uses the configured provider instance for API calls. Limitation: Provider settings do not guarantee permission to create any resource without valid credentials and IAM rights.

Incorrect Answers

A:

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

C:

This action is appropriate instead for a different, unlisted requirement: A compliance team wants to distinguish an empty Terraform plan from one with material changes in automation. It would be checked by: CI captures and classifies the command exit code separately from console prose. 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 nightly job wants to detect unexpected pending Terraform changes but should not mutate production resources. It would be checked by: The command returns a plan showing resource actions without executing them. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

Question 51

An infrastructure team faces this specific situation: A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. Which Terraform action most directly satisfies the requirement?

  1. Commit .terraform.lock.hcl and use required_providers version constraints to keep provider selection reproducible.
  2. Set provider = aws.secondary on that resource, referencing the aliased provider configuration.
  3. Declare separate supported Kubernetes and DNS providers and use their respective resource types in the same root module.
  4. Declare configuration_aliases in the child and pass the intended configurations through module.providers.

Explanation

Correct Answer

B:

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.

Incorrect Answers

A:

This is linked to a different situation: A team pins the AWS provider below 6.0 but a new contractor runs init and unexpectedly resolves a higher patch than other developers. There the relevant decision is: Commit .terraform.lock.hcl and use required_providers version constraints to keep provider selection reproducible. For the question's actual requirement — A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. — the specifically relevant decision is: Set provider = aws.secondary on that resource, referencing the aliased provider configuration. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A newly created project uses both a Kubernetes cluster and cloud DNS records, and the same release should manage them coherently. There the relevant decision is: Declare separate supported Kubernetes and DNS providers and use their respective resource types in the same root module. For the question's actual requirement — A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. — the specifically relevant decision is: Set provider = aws.secondary on that resource, referencing the aliased provider configuration. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A child network module expects two AWS provider aliases, but the root module has only passed its default provider. There the relevant decision is: Declare configuration_aliases in the child and pass the intended configurations through module.providers. For the question's actual requirement — A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. — the specifically relevant decision is: Set provider = aws.secondary on that resource, referencing the aliased provider configuration. It would therefore not resolve or assess the case as stated.

Question 52

A reviewer is confirming a change for the following use case: A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. The implementation follows this approach: Set provider = aws.secondary on that resource, referencing the aliased provider configuration. Which observation or acceptance test most directly verifies the intended result?

  1. Each module instance is associated with the correct account provider during plan.
  2. The planned resource address resolves through the secondary provider while unqualified resources use the default.
  3. A plan shows the bound object as no longer desired when its resource address disappears from configuration.
  4. Both operators observe the same resource addresses and coordinated state updates.

Explanation

Correct Answer

B:

Acceptance evidence: The planned resource address resolves through the secondary provider while unqualified resources use the default. It validates the proposed action, set provider = aws.secondary on that resource, referencing the aliased provider configuration, because explicit provider selection lets a resource use a non-default provider configuration. Remaining limitation: Alias names are Terraform-local configuration references, not separate plugin versions.

Incorrect Answers

A:

This is linked to a different situation: A security team calls the same reusable child module twice, once under each of two cloud accounts. There the relevant acceptance is: Each module instance is associated with the correct account provider during plan. For the question's actual requirement — A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. — the specifically relevant acceptance is: The planned resource address resolves through the secondary provider while unqualified resources use the default. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. There the relevant acceptance is: A plan shows the bound object as no longer desired when its resource address disappears from configuration. For the question's actual requirement — A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. — the specifically relevant acceptance is: The planned resource address resolves through the secondary provider while unqualified resources use the default. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: Two engineers share one project but each stores a different local state file and independently sees new resources in their plans. There the relevant acceptance is: Both operators observe the same resource addresses and coordinated state updates. For the question's actual requirement — A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. — the specifically relevant acceptance is: The planned resource address resolves through the secondary provider while unqualified resources use the default. It would therefore not resolve or assess the case as stated.

Question 53

Consider a proposed solution for this requirement: A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. The team plans to do the following: Set provider = aws.secondary on that resource, referencing the aliased provider configuration. Which limitation or operational caveat must remain in the review?

  1. Provider local names in HCL do not by themselves prove the external publisher namespace.
  2. A backend cannot reconcile genuinely conflicting code branches or permissions by itself.
  3. Alias names are Terraform-local configuration references, not separate plugin versions.
  4. The dependency lock file locks provider selections, not an immutable Terraform CLI binary version.

Explanation

Correct Answer

C:

The limitation is alias names are Terraform-local configuration references, not separate plugin versions. The proposed change is set provider = aws.secondary on that resource, referencing the aliased provider configuration. Validate it by checking the planned resource address resolves through the secondary provider while unqualified resources use the default. Explicit provider selection lets a resource use a non-default provider configuration.

Incorrect Answers

A:

This is linked to a different situation: A service module declares use of a third-party provider but two different namespaces publish plugins with the same local name. There the relevant limitation is: Provider local names in HCL do not by themselves prove the external publisher namespace. For the question's actual requirement — A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. — the specifically relevant limitation is: Alias names are Terraform-local configuration references, not separate plugin versions. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: Two engineers share one project but each stores a different local state file and independently sees new resources in their plans. There the relevant limitation is: A backend cannot reconcile genuinely conflicting code branches or permissions by itself. For the question's actual requirement — A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. — the specifically relevant limitation is: Alias names are Terraform-local configuration references, not separate plugin versions. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A team pins the AWS provider below 6.0 but a new contractor runs init and unexpectedly resolves a higher patch than other developers. There the relevant limitation is: The dependency lock file locks provider selections, not an immutable Terraform CLI binary version. For the question's actual requirement — A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. — the specifically relevant limitation is: Alias names are Terraform-local configuration references, not separate plugin versions. It would therefore not resolve or assess the case as stated.

Question 54

The team is reviewing a Terraform implementation for this case: A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Edit a JSON state file by hand as the normal way to make an unmanaged bucket Terraform-managed.
  2. Assume a provider's short local alias uniquely identifies its publisher across registries.
  3. Expect every resource to automatically use whichever provider alias was declared last.
  4. Assume module input variables alone can redirect all provider API calls without a provider mapping.

Explanation

Correct Answer

C:

Reject the assumption: Expect every resource to automatically use whichever provider alias was declared last. Instead, set provider = aws.secondary on that resource, referencing the aliased provider configuration. Explicit provider selection lets a resource use a non-default provider configuration. Acceptance evidence: The planned resource address resolves through the secondary provider while unqualified resources use the default.

Incorrect Answers

A:

This is linked to a different situation: A storage bucket exists in the cloud, but Terraform proposes creating another bucket with the intended name because its state has no binding. There the relevant misconception is: Edit a JSON state file by hand as the normal way to make an unmanaged bucket Terraform-managed. For the question's actual requirement — A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. — the specifically relevant misconception is: Expect every resource to automatically use whichever provider alias was declared last. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A service module declares use of a third-party provider but two different namespaces publish plugins with the same local name. There the relevant misconception is: Assume a provider's short local alias uniquely identifies its publisher across registries. For the question's actual requirement — A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. — the specifically relevant misconception is: Expect every resource to automatically use whichever provider alias was declared last. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: A security team calls the same reusable child module twice, once under each of two cloud accounts. There the relevant misconception is: Assume module input variables alone can redirect all provider API calls without a provider mapping. For the question's actual requirement — A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. — the specifically relevant misconception is: Expect every resource to automatically use whichever provider alias was declared last. It would therefore not resolve or assess the case as stated.

Question 55

A Terraform platform team is coordinating 2 independent decisions. Workstream A: 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 B: A security allowlist is an unordered set of unique ports and duplicate entries must not affect the configuration. Select exactly 2 actions, one addressing each distinct workstream.

  1. Check the exact backend's current locking configuration and version-specific requirements before assuming locks work.
  2. Set provider = aws.secondary on that resource, referencing the aliased provider configuration.
  3. Run terraform validate after successful initialization to check syntax and internal configuration consistency.
  4. Generate and review a plan for the import block, optionally using supported configuration generation where appropriate.
  5. Choose an appropriate set(number) input type for distinct port values.

Explanation

Correct Answers

B:

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 security allowlist is an unordered set of unique ports and duplicate entries must not affect the configuration, use this action: Choose an appropriate set(number) input type for distinct port values. Set collections represent uniqueness and discard index-based ordering semantics. Verify: Repeated port values collapse to unique members without relying on list positions. Limitation: Sets have no stable order and should not be indexed as though they were lists.

Incorrect Answers

A:

This option addresses a separate requirement: An engineer asks whether selecting an S3 bucket as remote storage automatically guarantees supported state locking under every Terraform/backend version. Evidence for that other requirement would be a controlled test or backend documentation confirms a lock is obtained for state-mutating operations; neither listed workstream asks for it.

C:

This option addresses a separate requirement: A developer adds a missing required argument to a resource definition and needs a fast validation before planning. Evidence for that other requirement would be the validate command reports whether the configuration passes Terraform's static checks; neither listed workstream asks for it.

D:

This option addresses a separate requirement: A new import block is committed for a resource whose configuration is incomplete and the team wants a review before apply. Evidence for that other requirement would be the plan shows import actions and any additional changes needed to align desired configuration; neither listed workstream asks for it.

Question 56

An infrastructure team faces this specific situation: A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. Which Terraform action most directly satisfies the requirement?

  1. Specify the provider's full registry source address under terraform.required_providers.
  2. Use the provider's supported environment or workload identity authentication mechanism rather than embedding credential literals.
  3. Explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations.
  4. Configure default and aliased AWS providers and assign the disaster-recovery resource to the alias.

Explanation

Correct Answer

B:

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.

Incorrect Answers

A:

This is linked to a different situation: A service module declares use of a third-party provider but two different namespaces publish plugins with the same local name. There the relevant decision is: Specify the provider's full registry source address under terraform.required_providers. For the question's actual requirement — A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. — the specifically relevant decision is: Use the provider's supported environment or workload identity authentication mechanism rather than embedding credential literals. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. There the relevant decision is: Explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations. For the question's actual requirement — A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. — the specifically relevant decision is: Use the provider's supported environment or workload identity authentication mechanism rather than embedding credential literals. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: An infrastructure release creates AWS resources in two regions, with a disaster-recovery instance explicitly assigned to the second region. There the relevant decision is: Configure default and aliased AWS providers and assign the disaster-recovery resource to the alias. For the question's actual requirement — A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. — the specifically relevant decision is: Use the provider's supported environment or workload identity authentication mechanism rather than embedding credential literals. It would therefore not resolve or assess the case as stated.

Question 57

A reviewer is confirming a change for the following use case: A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. The implementation follows this approach: Use the provider's supported environment or workload identity authentication mechanism rather than embedding credential literals. Which observation or acceptance test most directly verifies the intended result?

  1. Each module instance is associated with the correct account provider during plan.
  2. The updated .terraform.lock.hcl records the newly selected compatible provider and its checksums.
  3. The lock entry identifies the intended registry namespace, provider type, and selected version.
  4. The provider authenticates through the supported runtime identity without secrets appearing in committed configuration.

Explanation

Correct Answer

D:

Acceptance evidence: The provider authenticates through the supported runtime identity without secrets appearing in committed configuration. It validates the proposed action, use the provider's supported environment or workload identity authentication mechanism rather than embedding credential literals, because providers manage their own API connections; secure credential sourcing is separate from Terraform's HCL syntax. Remaining limitation: The exact environment variable or identity mechanism is provider-specific and must be checked in its documentation.

Incorrect Answers

A:

This is linked to a different situation: A security team calls the same reusable child module twice, once under each of two cloud accounts. There the relevant acceptance is: Each module instance is associated with the correct account provider during plan. For the question's actual requirement — A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. — the specifically relevant acceptance is: The provider authenticates through the supported runtime identity without secrets appearing in committed configuration. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A project intentionally needs a newer provider version allowed by its constraints, but init keeps reusing the version recorded in the lock file. There the relevant acceptance is: The updated .terraform.lock.hcl records the newly selected compatible provider and its checksums. For the question's actual requirement — A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. — the specifically relevant acceptance is: The provider authenticates through the supported runtime identity without secrets appearing in committed configuration. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A service module declares use of a third-party provider but two different namespaces publish plugins with the same local name. There the relevant acceptance is: The lock entry identifies the intended registry namespace, provider type, and selected version. For the question's actual requirement — A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. — the specifically relevant acceptance is: The provider authenticates through the supported runtime identity without secrets appearing in committed configuration. It would therefore not resolve or assess the case as stated.

Question 58

Consider a proposed solution for this requirement: A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. The team plans to do the following: Use the provider's supported environment or workload identity authentication mechanism rather than embedding credential literals. Which limitation or operational caveat must remain in the review?

  1. Do not put shared provider configuration blocks inside a modern reusable child module to solve this mapping.
  2. The exact environment variable or identity mechanism is provider-specific and must be checked in its documentation.
  3. The existence of a provider does not prove its API endpoints or credentials are reachable in every environment.
  4. A state binding records managed identity; it is not itself a backup of the remote service.

Explanation

Correct Answer

B:

The limitation is the exact environment variable or identity mechanism is provider-specific and must be checked in its documentation. The proposed change is use the provider's supported environment or workload identity authentication mechanism rather than embedding credential literals. Validate it by checking the provider authenticates through the supported runtime identity without secrets appearing in committed configuration. Providers manage their own API connections; secure credential sourcing is separate from Terraform's HCL syntax.

Incorrect Answers

A:

This is linked to a different situation: A security team calls the same reusable child module twice, once under each of two cloud accounts. There the relevant limitation is: Do not put shared provider configuration blocks inside a modern reusable child module to solve this mapping. For the question's actual requirement — A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. — the specifically relevant limitation is: The exact environment variable or identity mechanism is provider-specific and must be checked in its documentation. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A newly created project uses both a Kubernetes cluster and cloud DNS records, and the same release should manage them coherently. There the relevant limitation is: The existence of a provider does not prove its API endpoints or credentials are reachable in every environment. For the question's actual requirement — A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. — the specifically relevant limitation is: The exact environment variable or identity mechanism is provider-specific and must be checked in its documentation. It would therefore not resolve or assess the case as stated.

D:

This is linked to a different situation: An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. There the relevant limitation is: A state binding records managed identity; it is not itself a backup of the remote service. For the question's actual requirement — A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. — the specifically relevant limitation is: The exact environment variable or identity mechanism is provider-specific and must be checked in its documentation. It would therefore not resolve or assess the case as stated.

Question 59

The team is reviewing a Terraform implementation for this case: A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. Which tempting assumption would be specifically incorrect for this proposed implementation?

  1. Edit a JSON state file by hand as the normal way to make an unmanaged bucket Terraform-managed.
  2. Assume required_providers constraints alone always choose the identical provider build for every run.
  3. Treat provider dependency checksums as the definitive list of deployed infrastructure resources.
  4. Write static credentials into a versioned provider block because Terraform marks all input strings secret.

Explanation

Correct Answer

D:

Reject the assumption: Write static credentials into a versioned provider block because Terraform marks all input strings secret. Instead, 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. Acceptance evidence: The provider authenticates through the supported runtime identity without secrets appearing in committed configuration.

Incorrect Answers

A:

This is linked to a different situation: A storage bucket exists in the cloud, but Terraform proposes creating another bucket with the intended name because its state has no binding. There the relevant misconception is: Edit a JSON state file by hand as the normal way to make an unmanaged bucket Terraform-managed. For the question's actual requirement — A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. — the specifically relevant misconception is: Write static credentials into a versioned provider block because Terraform marks all input strings secret. It would therefore not resolve or assess the case as stated.

B:

This is linked to a different situation: A team pins the AWS provider below 6.0 but a new contractor runs init and unexpectedly resolves a higher patch than other developers. There the relevant misconception is: Assume required_providers constraints alone always choose the identical provider build for every run. For the question's actual requirement — A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. — the specifically relevant misconception is: Write static credentials into a versioned provider block because Terraform marks all input strings secret. It would therefore not resolve or assess the case as stated.

C:

This is linked to a different situation: A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. There the relevant misconception is: Treat provider dependency checksums as the definitive list of deployed infrastructure resources. For the question's actual requirement — A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. — the specifically relevant misconception is: Write static credentials into a versioned provider block because Terraform marks all input strings secret. It would therefore not resolve or assess the case as stated.

Question 60

A Terraform platform team is coordinating 3 independent decisions. Workstream A: A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. and Workstream B: A module emits an ordered list of three subnet IDs aligned with ordered availability zones and consumers depend on position. and Workstream C: A new environment needs to save state in a specific shared backend, and the team attempts to write backend settings under a resource block. Select exactly 3 actions, one addressing each distinct workstream.

  1. Declare one backend block inside terraform and reinitialize the working directory.
  2. Disable or lower TF_LOG after collecting the targeted diagnostic evidence.
  3. Declare the input in the child and supply environment = var.environment in the root's module call.
  4. Reference the local path with source = "./modules/security" inside the module block.
  5. Use a list(string) or tuple with explicit ordering semantics rather than a set.
  6. Use the provider's supported environment or workload identity authentication mechanism rather than embedding credential literals.

Explanation

Correct Answers

A:

For the workstream in which a new environment needs to save state in a specific shared backend, and the team attempts to write backend settings under a resource block, use this action: Declare one backend block inside terraform and reinitialize the working directory. A terraform backend configuration controls state location independently of managed resource blocks. Verify: terraform init reports the selected backend and plan reads the correct shared state. Limitation: Backend arguments cannot reference ordinary input variables or data-source attributes.

E:

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.

F:

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.

Incorrect Answers

B:

This action is appropriate instead for a different, unlisted requirement: An operator leaves TF_LOG=TRACE enabled in production for all runs and sees excessive potentially sensitive logs. It would be checked by: Subsequent normal runs no longer emit verbose tracing to the same log destination. 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 child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. It would be checked by: Planning resolves the child's environment value from the explicit module call. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.

D:

This action is appropriate instead for a different, unlisted requirement: A security group module lives in the local modules/security directory of the same versioned repository. It would be checked by: Terraform reads the local child module without fetching it from a remote registry. 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.