100% Latest & Updated HashiCorp Terraform Associate 004 Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 230
A Terraform platform team is coordinating 3 independent decisions. Workstream A: An operations team must surface a load balancer endpoint after apply so downstream jobs can consume it. and Workstream B: An engineer wants to commit the local .terraform directory to source control because it contains provider caches and backend settings. and Workstream C: A logistics firm needs a private data-center virtual machine and a public-cloud DNS record managed from one reviewed release. Select exactly 3 actions, one addressing each distinct workstream.
- Ignore .terraform and protect state while committing the intended HCL and provider dependency lock file.
- Declare resources through separate compatible providers in one Terraform configuration, with references for dependencies.
- Use terraform validate against initialized providers to catch unsupported or missing arguments.
- Use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs.
- Define a root output whose value references the managed load balancer's endpoint attribute.
- Specify a reviewed registry-module version constraint in the module block.
Explanation
Correct Answers
A:For the workstream in which an engineer wants to commit the local .terraform directory to source control because it contains provider caches and backend settings, use this action: Ignore .terraform and protect state while committing the intended HCL and provider dependency lock file. The initialization cache is machine-local and may carry sensitive backend metadata. Verify: The repository contains reviewed configuration and .terraform.lock.hcl, not transient cache or backend secrets. Limitation: A repo may use a remote backend, but local initialization data can still expose backend credentials.
B:For the workstream in which a logistics firm needs a private data-center virtual machine and a public-cloud DNS record managed from one reviewed release, use this action: Declare resources through separate compatible providers in one Terraform configuration, with references for dependencies. Terraform's provider model unifies the workflow while delegating API interactions to platform-specific plugins. Verify: A single plan lists the intended private and public resource actions under their respective providers. Limitation: Each endpoint still needs its own supported provider, authentication, connectivity, and permissions.
E:For the workstream in which an operations team must surface a load balancer endpoint after apply so downstream jobs can consume it, use this action: Define a root output whose value references the managed load balancer's endpoint attribute. Output blocks expose evaluated results and can depend on managed resource attributes. Verify: After apply, terraform output reports the expected endpoint from state. Limitation: An output does not create the referenced endpoint, and sensitive output values need safe handling.
Incorrect Answers
C:This action is appropriate instead for a different, unlisted requirement: A commit is syntactically valid HCL but includes a resource argument not supported by the installed provider schema. It would be checked by: Validation reports schema errors without making changes to remote infrastructure. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
D:This action is appropriate instead for a different, unlisted requirement: A team needs one shared network workspace to finish before dependent application workspaces start their own updates. It would be checked by: A successful upstream application can queue the configured downstream workspace run. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
F:This action is appropriate instead for a different, unlisted requirement: A team uses a module from the public registry and needs to prevent unreviewed minor changes after a security assessment. It would be checked by: Initialization selects a module release satisfying the stated registry version requirement. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
Question 231
An infrastructure team faces this specific situation: A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. Which Terraform action most directly satisfies the requirement?
- Use an ephemeral input value in an allowed Terraform ephemeral context, such as a supported provider configuration.
- Pass values through appropriate .tfvars files or documented TF_VAR_name environment variables.
- Declare map(string) as the input type and select an entry by key, such as var.instance_class["staging"].
- Reference the security group resource attribute directly from the database argument.
Explanation
Correct Answer
B:Pass values through appropriate .tfvars files or documented TF_VAR_name environment variables. Terraform evaluates input values separately from the module's reusable declarations. Verify: The plan uses the expected values while the shared module source remains unchanged. Limitation: Precedence between inputs must be understood and secret values still need secure sourcing.
Incorrect Answers
A:This is linked to a different situation: A short-lived token must be used during an operation, and auditors require that the token not be written to a plan file. There the relevant decision is: Use an ephemeral input value in an allowed Terraform ephemeral context, such as a supported provider configuration. For the question's actual requirement — A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. — the specifically relevant decision is: Pass values through appropriate .tfvars files or documented TF_VAR_name environment variables. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A configuration needs a map from environment names to individually selected instance classes, with each value a string. There the relevant decision is: Declare map(string) as the input type and select an entry by key, such as var.instance_class["staging"]. For the question's actual requirement — A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. — the specifically relevant decision is: Pass values through appropriate .tfvars files or documented TF_VAR_name environment variables. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A database security group must be passed into a managed database resource without copying IDs into hardcoded variables. There the relevant decision is: Reference the security group resource attribute directly from the database argument. For the question's actual requirement — A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. — the specifically relevant decision is: Pass values through appropriate .tfvars files or documented TF_VAR_name environment variables. It would therefore not resolve or assess the case as stated.
Question 232
A reviewer is confirming a change for the following use case: A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. The implementation follows this approach: Pass values through appropriate .tfvars files or documented TF_VAR_name environment variables. Which observation or acceptance test most directly verifies the intended result?
- The plan uses the expected values while the shared module source remains unchanged.
- The dependency graph orders the attachment action before the dependent rule operation.
- Planning with an invalid input produces a useful validation error before unwanted resource operations.
- Inspect the chosen mechanism and verify secrets do not appear in plan/state artifacts where omission is required.
Explanation
Correct Answer
A:Acceptance evidence: The plan uses the expected values while the shared module source remains unchanged. It validates the proposed action, pass values through appropriate .tfvars files or documented TF_VAR_name environment variables, because terraform evaluates input values separately from the module's reusable declarations. Remaining limitation: Precedence between inputs must be understood and secret values still need secure sourcing.
Incorrect Answers
B:This is linked to a different situation: A firewall rule should be provisioned only after a policy attachment exists, but the rule's arguments do not reference that attachment. There the relevant acceptance is: The dependency graph orders the attachment action before the dependent rule operation. For the question's actual requirement — A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. — the specifically relevant acceptance is: The plan uses the expected values while the shared module source remains unchanged. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A reusable module needs to reject a user-provided CIDR that is outside a documented allowed address family. There the relevant acceptance is: Planning with an invalid input produces a useful validation error before unwanted resource operations. For the question's actual requirement — A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. — the specifically relevant acceptance is: The plan uses the expected values while the shared module source remains unchanged. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: An application secret is supplied as a Terraform variable marked sensitive, and a teammate claims it cannot enter a saved state file. There the relevant acceptance is: Inspect the chosen mechanism and verify secrets do not appear in plan/state artifacts where omission is required. For the question's actual requirement — A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. — the specifically relevant acceptance is: The plan uses the expected values while the shared module source remains unchanged. It would therefore not resolve or assess the case as stated.
Question 233
Consider a proposed solution for this requirement: A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. The team plans to do the following: Pass values through appropriate .tfvars files or documented TF_VAR_name environment variables. Which limitation or operational caveat must remain in the review?
- Custom validation must reflect the true policy; a syntactically valid condition may be overly broad or restrictive.
- The data source requires access and will fail if its lookup criteria match no suitable object.
- Ephemeral values have context restrictions and cannot be inserted into arbitrary persistent expressions.
- Precedence between inputs must be understood and secret values still need secure sourcing.
Explanation
Correct Answer
D:The limitation is precedence between inputs must be understood and secret values still need secure sourcing. The proposed change is pass values through appropriate .tfvars files or documented TF_VAR_name environment variables. Validate it by checking the plan uses the expected values while the shared module source remains unchanged. Terraform evaluates input values separately from the module's reusable declarations.
Incorrect Answers
A:This is linked to a different situation: A reusable module needs to reject a user-provided CIDR that is outside a documented allowed address family. There the relevant limitation is: Custom validation must reflect the true policy; a syntactically valid condition may be overly broad or restrictive. For the question's actual requirement — A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. — the specifically relevant limitation is: Precedence between inputs must be understood and secret values still need secure sourcing. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: A web team must create a new load balancer and also look up an existing shared network ID managed by another team. There the relevant limitation is: The data source requires access and will fail if its lookup criteria match no suitable object. For the question's actual requirement — A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. — the specifically relevant limitation is: Precedence between inputs must be understood and secret values still need secure sourcing. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A short-lived token must be used during an operation, and auditors require that the token not be written to a plan file. There the relevant limitation is: Ephemeral values have context restrictions and cannot be inserted into arbitrary persistent expressions. For the question's actual requirement — A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. — the specifically relevant limitation is: Precedence between inputs must be understood and secret values still need secure sourcing. It would therefore not resolve or assess the case as stated.
Question 234
The team is reviewing a Terraform implementation for this case: A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. Which tempting assumption would be specifically incorrect for this proposed implementation?
- Assume prevent_destroy continues to protect an object after the containing resource block is deleted.
- Assume every failed check block prevents Terraform from applying all resources.
- Rewrite the variable block's default on every run as the required deployment interface.
- Use count with changing list positions while assuming unrelated indices can never shift.
Explanation
Correct Answer
C:Reject the assumption: Rewrite the variable block's default on every run as the required deployment interface. Instead, pass values through appropriate .tfvars files or documented TF_VAR_name environment variables. Terraform evaluates input values separately from the module's reusable declarations. Acceptance evidence: The plan uses the expected values while the shared module source remains unchanged.
Incorrect Answers
A:This is linked to a different situation: A team's database must never be accidentally destroyed by a routine Terraform plan while its resource declaration remains managed. There the relevant misconception is: Assume prevent_destroy continues to protect an object after the containing resource block is deleted. For the question's actual requirement — A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. — the specifically relevant misconception is: Rewrite the variable block's default on every run as the required deployment interface. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: An operations group wants an infrastructure health assertion that can report a diagnostic without behaving exactly like a resource precondition. There the relevant misconception is: Assume every failed check block prevents Terraform from applying all resources. For the question's actual requirement — A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. — the specifically relevant misconception is: Rewrite the variable block's default on every run as the required deployment interface. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: An application team must create one DNS record per hostname from a stable set of known domain names. There the relevant misconception is: Use count with changing list positions while assuming unrelated indices can never shift. For the question's actual requirement — A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. — the specifically relevant misconception is: Rewrite the variable block's default on every run as the required deployment interface. It would therefore not resolve or assess the case as stated.
Question 235
A Terraform platform team is coordinating 2 independent decisions. Workstream A: A deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL. and Workstream B: Two release pipelines try to update the same remote state simultaneously and one sees a lock-acquisition failure. Select exactly 2 actions, one addressing each distinct workstream.
- Pass values through appropriate .tfvars files or documented TF_VAR_name environment variables.
- Declare separate supported Kubernetes and DNS providers and use their respective resource types in the same root module.
- Let the state lock serialize operations and retry after the active writer finishes.
- Re-run terraform init and review module/provider resolution within existing constraints.
- Select the correct workspace/backend state and run terraform destroy only after reviewing its destruction plan.
Explanation
Correct Answers
A:For the workstream in which a deployment job must supply different nonsecret inputs for each pipeline run without editing source-controlled HCL, use this action: Pass values through appropriate .tfvars files or documented TF_VAR_name environment variables. Terraform evaluates input values separately from the module's reusable declarations. Verify: The plan uses the expected values while the shared module source remains unchanged. Limitation: Precedence between inputs must be understood and secret values still need secure sourcing.
C:For the workstream in which two release pipelines try to update the same remote state simultaneously and one sees a lock-acquisition failure, use this action: Let the state lock serialize operations and retry after the active writer finishes. State locking prevents concurrent writers from independently changing a shared snapshot. Verify: Only one run modifies the protected state at a time and the second safely waits or fails. Limitation: Locking support depends on backend type; disabling locks invites state corruption.
Incorrect Answers
B:This option addresses a separate requirement: A newly created project uses both a Kubernetes cluster and cloud DNS records, and the same release should manage them coherently. Evidence for that other requirement would be the plan shows objects from both provider schemas and does not misroute requests across APIs; neither listed workstream asks for it.
D:This option addresses a separate requirement: A CI job already has provider plugins cached and wants to reinitialize a checkout safely after an ordinary module change. Evidence for that other requirement would be initialization completes without destroying infrastructure and updates required module installations; neither listed workstream asks for it.
E:This option addresses a separate requirement: A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. Evidence for that other requirement would be the destruction plan lists the managed objects targeted in that state, not arbitrary cloud resources; neither listed workstream asks for it.
Question 236
An infrastructure team faces this specific situation: A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. Which Terraform action most directly satisfies the requirement?
- Declare the child's input variable and pass subnet_ids explicitly through its module block arguments.
- Use a resource precondition whose condition can be evaluated before the relevant resource operation.
- Use a conditional expression over a declared environment variable to select the appropriate hostname.
- Index the resource collection by its actual for_each key rather than assuming numeric list positions.
Explanation
Correct Answer
A:Declare the child's input variable and pass subnet_ids explicitly through its module block arguments. Modules receive inputs through explicit module-call arguments, keeping scopes understandable. Verify: The child's configuration validates and resolves the provided subnet IDs in its own scope. Limitation: Input variable declarations are module-scoped, not automatically shared across the entire configuration.
Incorrect Answers
B:This is linked to a different situation: A team must verify a network policy's expected input range before taking an action that would violate the rule. There the relevant decision is: Use a resource precondition whose condition can be evaluated before the relevant resource operation. For the question's actual requirement — A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. — the specifically relevant decision is: Declare the child's input variable and pass subnet_ids explicitly through its module block arguments. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A deployment needs to choose a service hostname based on whether the environment is production. There the relevant decision is: Use a conditional expression over a declared environment variable to select the appropriate hostname. For the question's actual requirement — A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. — the specifically relevant decision is: Declare the child's input variable and pass subnet_ids explicitly through its module block arguments. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A module uses for_each on a map of regions and must output one subnet ID for the us-east-1 instance. There the relevant decision is: Index the resource collection by its actual for_each key rather than assuming numeric list positions. For the question's actual requirement — A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. — the specifically relevant decision is: Declare the child's input variable and pass subnet_ids explicitly through its module block arguments. It would therefore not resolve or assess the case as stated.
Question 237
A reviewer is confirming a change for the following use case: A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. The implementation follows this approach: Declare the child's input variable and pass subnet_ids explicitly through its module block arguments. Which observation or acceptance test most directly verifies the intended result?
- Subsequent plans avoid proposing updates solely because the ignored tag changed outside Terraform.
- Inspect the chosen mechanism and verify secrets do not appear in plan/state artifacts where omission is required.
- A plan that would destroy the configured protected resource is rejected with an error.
- The child's configuration validates and resolves the provided subnet IDs in its own scope.
Explanation
Correct Answer
D:Acceptance evidence: The child's configuration validates and resolves the provided subnet IDs in its own scope. It validates the proposed action, declare the child's input variable and pass subnet_ids explicitly through its module block arguments, because modules receive inputs through explicit module-call arguments, keeping scopes understandable. Remaining limitation: Input variable declarations are module-scoped, not automatically shared across the entire configuration.
Incorrect Answers
A:This is linked to a different situation: A managed resource's tag is updated by an external compliance agent, and Terraform must not revert only that tag on every plan. There the relevant acceptance is: Subsequent plans avoid proposing updates solely because the ignored tag changed outside Terraform. For the question's actual requirement — A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. — the specifically relevant acceptance is: The child's configuration validates and resolves the provided subnet IDs in its own scope. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: An application secret is supplied as a Terraform variable marked sensitive, and a teammate claims it cannot enter a saved state file. There the relevant acceptance is: Inspect the chosen mechanism and verify secrets do not appear in plan/state artifacts where omission is required. For the question's actual requirement — A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. — the specifically relevant acceptance is: The child's configuration validates and resolves the provided subnet IDs in its own scope. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A team's database must never be accidentally destroyed by a routine Terraform plan while its resource declaration remains managed. There the relevant acceptance is: A plan that would destroy the configured protected resource is rejected with an error. For the question's actual requirement — A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. — the specifically relevant acceptance is: The child's configuration validates and resolves the provided subnet IDs in its own scope. It would therefore not resolve or assess the case as stated.
Question 238
Consider a proposed solution for this requirement: A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. The team plans to do the following: Declare the child's input variable and pass subnet_ids explicitly through its module block arguments. Which limitation or operational caveat must remain in the review?
- Input variable declarations are module-scoped, not automatically shared across the entire configuration.
- Checks and preconditions have different failure effects, so choose based on governance needs.
- A precondition only protects the invariant actually encoded in its expression.
- dynamic can generate normal nested blocks, not arbitrary provider meta-arguments or resource blocks.
Explanation
Correct Answer
A:The limitation is input variable declarations are module-scoped, not automatically shared across the entire configuration. The proposed change is declare the child's input variable and pass subnet_ids explicitly through its module block arguments. Validate it by checking the child's configuration validates and resolves the provided subnet IDs in its own scope. Modules receive inputs through explicit module-call arguments, keeping scopes understandable.
Incorrect Answers
B:This is linked to a different situation: An operations group wants an infrastructure health assertion that can report a diagnostic without behaving exactly like a resource precondition. There the relevant limitation is: Checks and preconditions have different failure effects, so choose based on governance needs. For the question's actual requirement — A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. — the specifically relevant limitation is: Input variable declarations are module-scoped, not automatically shared across the entire configuration. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A team must verify a network policy's expected input range before taking an action that would violate the rule. There the relevant limitation is: A precondition only protects the invariant actually encoded in its expression. For the question's actual requirement — A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. — the specifically relevant limitation is: Input variable declarations are module-scoped, not automatically shared across the entire configuration. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A security group requires multiple repeated ingress blocks derived from a variable collection, and copy-pasting blocks is error-prone. There the relevant limitation is: dynamic can generate normal nested blocks, not arbitrary provider meta-arguments or resource blocks. For the question's actual requirement — A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. — the specifically relevant limitation is: Input variable declarations are module-scoped, not automatically shared across the entire configuration. It would therefore not resolve or assess the case as stated.
Question 239
The team is reviewing a Terraform implementation for this case: A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. Which tempting assumption would be specifically incorrect for this proposed implementation?
- Treat a for expression as a command that modifies original remote resources in-place.
- Assume a root variable of the same name is implicitly imported into all children.
- Use a list and assume duplicate elements are automatically removed while maintaining indices.
- Treat an unrelated output value as though it automatically becomes a resource precondition.
Explanation
Correct Answer
B:Reject the assumption: Assume a root variable of the same name is implicitly imported into all children. Instead, declare the child's input variable and pass subnet_ids explicitly through its module block arguments. Modules receive inputs through explicit module-call arguments, keeping scopes understandable. Acceptance evidence: The child's configuration validates and resolves the provided subnet IDs in its own scope.
Incorrect Answers
A:This is linked to a different situation: A pipeline produces a list of service names with inconsistent letter casing and needs normalized DNS labels. There the relevant misconception is: Treat a for expression as a command that modifies original remote resources in-place. For the question's actual requirement — A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. — the specifically relevant misconception is: Assume a root variable of the same name is implicitly imported into all children. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A security allowlist is an unordered set of unique ports and duplicate entries must not affect the configuration. There the relevant misconception is: Use a list and assume duplicate elements are automatically removed while maintaining indices. For the question's actual requirement — A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. — the specifically relevant misconception is: Assume a root variable of the same name is implicitly imported into all children. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A team must verify a network policy's expected input range before taking an action that would violate the rule. There the relevant misconception is: Treat an unrelated output value as though it automatically becomes a resource precondition. For the question's actual requirement — A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. — the specifically relevant misconception is: Assume a root variable of the same name is implicitly imported into all children. It would therefore not resolve or assess the case as stated.
Question 240
A Terraform platform team is coordinating 3 independent decisions. Workstream A: A child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child. and Workstream B: A Terraform job crashed and left a stale lock, but the team has not verified whether any other run is active. and Workstream C: An operations group wants four engineers to propose a subnet change without all four immediately modifying production. Select exactly 3 actions, one addressing each distinct workstream.
- Use terraform state list to enumerate addresses in the selected state.
- Move to an appropriate shared backend with concurrency controls so both plans use the same authoritative state.
- Declare the child's input variable and pass subnet_ids explicitly through its module block arguments.
- Keep one authoritative managed address per remote object and refactor references accordingly.
- Confirm there is no current state writer, then use force-unlock only for the team's own stale lock ID.
- Review the HCL change through version control and inspect a Terraform execution plan before authorized apply.
Explanation
Correct Answers
C:For the workstream in which a child module expects a variable named subnet_ids, but the calling root references an undeclared variable from inside the child, use this action: Declare the child's input variable and pass subnet_ids explicitly through its module block arguments. Modules receive inputs through explicit module-call arguments, keeping scopes understandable. Verify: The child's configuration validates and resolves the provided subnet IDs in its own scope. Limitation: Input variable declarations are module-scoped, not automatically shared across the entire configuration.
E: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.
F:For the workstream in which an operations group wants four engineers to propose a subnet change without all four immediately modifying production, use this action: Review the HCL change through version control and inspect a Terraform execution plan before authorized apply. The plan allows collaboration and review of proposed real-resource actions, which code diffs alone do not reveal. Verify: A pull request includes configuration differences and a plan describing expected resource mutations. Limitation: A plan is a snapshot of observed state and can become stale before apply.
Incorrect Answers
A:This action is appropriate instead for a different, unlisted requirement: A release engineer needs the resource addresses Terraform currently manages without printing secrets from state. It would be checked by: The command outputs the expected resource instance addresses for further inspection. 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: Two engineers share one project but each stores a different local state file and independently sees new resources in their plans. It would be checked by: Both operators observe the same resource addresses and coordinated state updates. 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 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