Question 570
An engineer needs to enforce a hidden prerequisite for an entire child module as part of a planned migration. Which option is the best fit?
- Use a local module while iterating on a design
- Define a
module block with source
- Use
depends_on on a module when necessary
- Share provider configurations from the root
- Supply required module input arguments
Explanation
Correct Answer
C:An explicit module dependency orders its operations after the listed object; prefer output references when they can express the dependency more narrowly; this behavior should be assessed against the concrete need to enforce a hidden prerequisite for an entire child module. This directly supports the task to enforce a hidden prerequisite for an entire child module during a maintenance request.
Incorrect Answers
A:A local path loads code directly from the checkout; this differs from upgrading an immutable release in an external module registry; this behavior should be assessed against the concrete need to enforce a hidden prerequisite for an entire child module. That can be useful when the aim is to test in-repository child changes before publishing a version, but it does not directly deliver the requested ability to enforce a hidden prerequisite for an entire child module.
B:A module call loads the child configuration and supplies its arguments; the caller's root remains responsible for backend setup; this behavior should be assessed against the concrete need to enforce a hidden prerequisite for an entire child module. The distinction matters here: using that mechanism to instantiate a reusable child configuration from a known location would still leave the objective to enforce a hidden prerequisite for an entire child module unmet.
D:A child module should declare provider requirements while receiving provider configurations through inheritance or explicit mapping; this supports flexible reuse; this behavior should be assessed against the concrete need to enforce a hidden prerequisite for an entire child module. The stated requirement is to enforce a hidden prerequisite for an entire child module, not to avoid configuring cloud credentials separately in every reusable child; this alternative addresses a different control or phase.
E:Terraform maps arguments by name to variables declared inside the child; missing required values prevent a valid plan; this behavior should be assessed against the concrete need to enforce a hidden prerequisite for an entire child module. That can be useful when the aim is to meet the child module's variable contract, but it does not directly deliver the requested ability to enforce a hidden prerequisite for an entire child module.
Question 571
A platform team is comparing local storage and shared remote backends. A reviewer must determine how to include state confidentiality in developer-machine security. Which action is the appropriate choice?
- Protect local workstation backups
- Use the default
local backend
- Avoid deleting state to repair an ordinary HCL error
- Understand a local backend's locking mechanism
Explanation
Correct Answer
A:Copies of state and plan files can expose provider-returned secrets; encrypting disks and limiting file access remain important even for demonstration environments; this behavior should be assessed against the concrete need to include state confidentiality in developer-machine security. This directly supports the task to include state confidentiality in developer-machine security during a cross-team handoff.
Incorrect Answers
B:By default Terraform writes state in the working directory, typically terraform.tfstate; local storage does not supply shared team coordination; this behavior should be assessed against the concrete need to include state confidentiality in developer-machine security. It may support a related workflow, but the question specifically requires the mechanism for include state confidentiality in developer-machine security rather than store state in a local filesystem file without configuring a remote backend.
C:Removing state does not delete remote objects, but it removes their managed mappings; a later plan may attempt duplicate creation rather than fixing source syntax; this behavior should be assessed against the concrete need to include state confidentiality in developer-machine security. The stated requirement is to include state confidentiality in developer-machine security, not to prevent Terraform from losing track of existing objects; this alternative addresses a different control or phase.
D:The local backend uses local filesystem locking where supported; it does not coordinate developers operating separate copies on different machines; this behavior should be assessed against the concrete need to include state confidentiality in developer-machine security. That can be useful when the aim is to recognize that local state can be locked to avoid concurrent local access, but it does not directly deliver the requested ability to include state confidentiality in developer-machine security.
Question 572
The immediate Terraform task is to isolate independently managed infrastructure components. Which method handles that task most directly?
- Understand a crash can leave a stale lock
- Serialize applies in CI for a shared workspace
- Avoid
-lock=false for shared production state
- Use separate states to reduce unrelated lock contention
Explanation
Correct Answer
D:Different state keys or workspaces allow separate lock scopes; splitting state also introduces explicit cross-state integration responsibilities; this behavior should be assessed against the concrete need to isolate independently managed infrastructure components. This directly supports the task to isolate independently managed infrastructure components during a platform review.
Incorrect Answers
A:Abnormal termination may prevent normal unlock; verify process inactivity and current state integrity before administrative cleanup; this behavior should be assessed against the concrete need to isolate independently managed infrastructure components. That can be useful when the aim is to distinguish genuine active operations from abandoned lock records, but it does not directly deliver the requested ability to isolate independently managed infrastructure components.
B:Pipeline serialization reduces contention and conflicting approval assumptions; backend locking is an additional integrity layer rather than a full deployment scheduler; this behavior should be assessed against the concrete need to isolate independently managed infrastructure components. The distinction matters here: using that mechanism to avoid overlapping infrastructure modifications even when locks exist would still leave the objective to isolate independently managed infrastructure components unmet.
C:Disabling locking increases risk of simultaneous updates and state corruption; it is not a substitute for resolving a stale lock; this behavior should be assessed against the concrete need to isolate independently managed infrastructure components. It may support a related workflow, but the question specifically requires the mechanism for isolate independently managed infrastructure components rather than keep concurrency protection during normal writes.
Question 573
In a planned migration, the requested result is to select a supported remote state storage implementation. What should the engineer select?
- Protect remote state with encryption and restricted IAM
- Use
terraform init -migrate-state for a backend switch
- Declare
terraform { backend "s3" { ... } }
- Use distinct state keys or workspaces for environments
Explanation
Correct Answer
C:A backend block chooses Terraform state storage and related settings; it does not configure the AWS provider used for managed resources; this behavior should be assessed against the concrete need to select a supported remote state storage implementation. This directly supports the task to select a supported remote state storage implementation during a deployment checklist.
Incorrect Answers
A:Remote state can include secrets, IDs, and metadata; confidentiality and access authorization are required even when console outputs are marked sensitive; this behavior should be assessed against the concrete need to select a supported remote state storage implementation. The stated requirement is to select a supported remote state storage implementation, not to secure a centrally stored record of infrastructure attributes; this alternative addresses a different control or phase.
B:Migration helps preserve object bindings when changing backends; backup and verify the source state first because the operation affects management continuity; this behavior should be assessed against the concrete need to select a supported remote state storage implementation. That can be useful when the aim is to copy existing state to the new location during reinitialization, but it does not directly deliver the requested ability to select a supported remote state storage implementation.
D:Isolation prevents two environments from sharing addresses and IDs in one state; the storage service can still be shared if access boundaries are enforced; this behavior should be assessed against the concrete need to select a supported remote state storage implementation. It may support a related workflow, but the question specifically requires the mechanism for select a supported remote state storage implementation rather than separate staging and production resource bindings.
Question 574
An infrastructure team is choosing safe state-refactoring and drift actions. The team must both preview a state update that accepts the current remote attributes and rename a Terraform resource address while preserving ongoing management of the same remote object. Which paired choice implements those distinct goals?
- Use
terraform plan -refresh-only + Use a moved block for an address rename
- Treat out-of-band tag updates as drift + Use a
removed block with destroy = false
- Use
terraform plan -refresh-only + Use terraform state mv for imperative state relocation
- Use
terraform state pull for an administrative snapshot + Use a moved block for an address rename
Explanation
Correct Answer
A:For the first criterion, refresh-only does not plan corrective resource changes; applying that plan updates Terraform's state representation of the observed infrastructure; this behavior should be assessed against the concrete need to preview a state update that accepts the current remote attributes and rename a Terraform resource address while preserving ongoing management of the same remote object; this directly addresses the need to preview a state update that accepts the current remote attributes. For the separate second criterion, the from/to mapping teaches Terraform how to refactor tracked addresses before planning; it prevents an unnecessary destroy/create caused solely by a configuration rename; this behavior should be assessed against the concrete need to preview a state update that accepts the current remote attributes and rename a Terraform resource address while preserving ongoing management of the same remote object; this fulfills the need to rename a Terraform resource address while preserving ongoing management of the same remote object. Together they cover the independent tasks of preview a state update that accepts the current remote attributes and rename a Terraform resource address while preserving ongoing management of the same remote object without exchanging the responsibilities of these features.
Incorrect Answers
B:The first measure is intended to understand reconciliation when provider-observed values differ from HCL: Terraform may plan to restore declared tags unless lifecycle rules deliberately ignore certain changes; the external edit does not automatically rewrite HCL; this behavior should be assessed against the concrete need to preview a state update that accepts the current remote attributes and rename a Terraform resource address while preserving ongoing management of the same remote object. The second measure is intended to document a handoff where Terraform relinquishes ownership but leaves deployed infrastructure untouched: The removed block records the intentional withdrawal of management without instructing the provider to delete the remote object; it is not a mere address rename like a moved block; this behavior should be assessed against the concrete need to preview a state update that accepts the current remote attributes and rename a Terraform resource address while preserving ongoing management of the same remote object. Neither is the directly designated method for the separate goals of preview a state update that accepts the current remote attributes and rename a Terraform resource address while preserving ongoing management of the same remote object in this review.
C:The first measure meets the requirement to preview a state update that accepts the current remote attributes, but its partner serves a different role: State move adjusts tracked bindings and writes a backup; it does not call a provider to physically move the cloud object; this behavior should be assessed against the concrete need to preview a state update that accepts the current remote attributes and rename a Terraform resource address while preserving ongoing management of the same remote object. That second component is designed to change which Terraform address owns an existing object, so the still-missing criterion is to rename a Terraform resource address while preserving ongoing management of the same remote object, while the first criterion remains preview a state update that accepts the current remote attributes.
D:The second measure does meet the rename a Terraform resource address while preserving ongoing management of the same remote object requirement, but the first is designed for another concern: Pull emits the full state, potentially including secrets; it should not be treated as a public debugging log; this behavior should be assessed against the concrete need to preview a state update that accepts the current remote attributes and rename a Terraform resource address while preserving ongoing management of the same remote object. That first component is designed to download a copy of the current backend state for protected inspection, which does not accomplish the requested task to preview a state update that accepts the current remote attributes, even though the other measure satisfies rename a Terraform resource address while preserving ongoing management of the same remote object.
Question 575
The immediate Terraform task is to isolate environments while sharing the same root configuration. Which method handles that task most directly?
- Reinitialize after changing backend configuration
- Distinguish
terraform.tfstate from .terraform/terraform.tfstate
- Use the default
local backend
- Understand a local backend's locking mechanism
- Keep local state out of Git
- Use CLI workspaces for separate local state snapshots
Explanation
Correct Answer
F:Terraform CLI workspaces select different state instances; local nondefault workspaces use workspace-specific file locations; they do not establish HCP workspace permissions; this behavior should be assessed against the concrete need to isolate environments while sharing the same root configuration. This directly supports the task to isolate environments while sharing the same root configuration during a platform review.
Incorrect Answers
A:Backend setting changes require init to recognize and potentially migrate state; a subsequent plan alone cannot safely change backend storage; this behavior should be assessed against the concrete need to isolate environments while sharing the same root configuration. It may support a related workflow, but the question specifically requires the mechanism for isolate environments while sharing the same root configuration rather than make Terraform adopt the new local or remote state location.
B:The top-level file may contain actual local state; the file under .terraform/ holds initialization/backend information and may include credential-related settings; this behavior should be assessed against the concrete need to isolate environments while sharing the same root configuration. The stated requirement is to isolate environments while sharing the same root configuration, not to separate infrastructure state from local backend configuration metadata; this alternative addresses a different control or phase.
C:By default Terraform writes state in the working directory, typically terraform.tfstate; local storage does not supply shared team coordination; this behavior should be assessed against the concrete need to isolate environments while sharing the same root configuration. That can be useful when the aim is to store state in a local filesystem file without configuring a remote backend, but it does not directly deliver the requested ability to isolate environments while sharing the same root configuration.
D:The local backend uses local filesystem locking where supported; it does not coordinate developers operating separate copies on different machines; this behavior should be assessed against the concrete need to isolate environments while sharing the same root configuration. The distinction matters here: using that mechanism to recognize that local state can be locked to avoid concurrent local access would still leave the objective to isolate environments while sharing the same root configuration unmet.
E:State can contain secrets even if outputs are redacted; a version-control checkout is not a secure state database or concurrency mechanism; this behavior should be assessed against the concrete need to isolate environments while sharing the same root configuration. It may support a related workflow, but the question specifically requires the mechanism for isolate environments while sharing the same root configuration rather than avoid exposing sensitive resource attributes in repository history.
Question 576
A Terraform rollout has separate acceptance criteria: keep concurrency protection during normal writes and avoid accidental interference with someone else's active run. Which combined approach directly satisfies the two criteria?
- Avoid
-lock=false for shared production state + Use -lock-timeout=5m where supported
- Understand a crash can leave a stale lock + Use a backend with state locking
- Avoid
-lock=false for shared production state + Keep lock tokens or IDs private to administrators
- Use
terraform force-unlock LOCK_ID only after verification + Keep lock tokens or IDs private to administrators
Explanation
Correct Answer
C:For the first criterion, disabling locking increases risk of simultaneous updates and state corruption; it is not a substitute for resolving a stale lock; this behavior should be assessed against the concrete need to keep concurrency protection during normal writes and avoid accidental interference with someone else's active run; this directly addresses the need to keep concurrency protection during normal writes. For the separate second criterion, an unlock command can affect shared state coordination; its use should be audited and restricted to trusted operators; this behavior should be assessed against the concrete need to keep concurrency protection during normal writes and avoid accidental interference with someone else's active run; this fulfills the need to avoid accidental interference with someone else's active run. Together they cover the independent tasks of keep concurrency protection during normal writes and avoid accidental interference with someone else's active run without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure meets the requirement to keep concurrency protection during normal writes, but its partner serves a different role: The timeout specifies how long to wait for lock availability before failing; it does not forcibly terminate another process; this behavior should be assessed against the concrete need to keep concurrency protection during normal writes and avoid accidental interference with someone else's active run. That second component is designed to let a Terraform operation retry acquiring a busy state lock, so the still-missing criterion is to avoid accidental interference with someone else's active run, while the first criterion remains keep concurrency protection during normal writes.
B:The first measure is intended to distinguish genuine active operations from abandoned lock records: Abnormal termination may prevent normal unlock; verify process inactivity and current state integrity before administrative cleanup; this behavior should be assessed against the concrete need to keep concurrency protection during normal writes and avoid accidental interference with someone else's active run. The second measure is intended to prevent simultaneous runs from overwriting shared state: Backends that support locking serialize state-changing operations; this guards consistency but does not replace change approval; this behavior should be assessed against the concrete need to keep concurrency protection during normal writes and avoid accidental interference with someone else's active run. Neither is the directly designated method for the separate goals of keep concurrency protection during normal writes and avoid accidental interference with someone else's active run in this review.
D:The second measure does meet the avoid accidental interference with someone else's active run requirement, but the first is designed for another concern: Force-unlock bypasses normal safeguards and can permit conflicting state writes; the lock ID helps ensure the intended lock is targeted; this behavior should be assessed against the concrete need to keep concurrency protection during normal writes and avoid accidental interference with someone else's active run. That first component is designed to clear a stale lock when the original owner is definitely inactive, which does not accomplish the requested task to keep concurrency protection during normal writes, even though the other measure satisfies avoid accidental interference with someone else's active run.
Question 577
A build pipeline must initialize an external state service. The team must both accept new backend settings without copying old state and avoid hardcoding secret authentication fields in HCL or init flags. Which paired choice implements those distinct goals?
- Enable state locking when supported + Understand
terraform_remote_state reads root outputs
- Recognize backend blocks cannot use
var.* expressions + Use backend-specific environment variables for credentials
- Use
terraform init -reconfigure when not migrating + Use backend-specific environment variables for credentials
- Use
terraform init -reconfigure when not migrating + Use backend migration instead of copying arbitrary JSON
Explanation
Correct Answer
C:For the first criterion, reconfiguration forgets the previously initialized backend relationship; it is dangerous if the operator mistakenly believes existing bindings moved with it; this behavior should be assessed against the concrete need to accept new backend settings without copying old state and avoid hardcoding secret authentication fields in HCL or init flags; this directly addresses the need to accept new backend settings without copying old state. For the separate second criterion, environment-based authentication can reduce disclosure in saved metadata and plans; backend permissions must still permit the required state operations; this behavior should be assessed against the concrete need to accept new backend settings without copying old state and avoid hardcoding secret authentication fields in HCL or init flags; this fulfills the need to avoid hardcoding secret authentication fields in HCL or init flags. Together they cover the independent tasks of accept new backend settings without copying old state and avoid hardcoding secret authentication fields in HCL or init flags without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure is intended to protect the authoritative snapshot from concurrent writers: Storage alone does not coordinate multiple applies; the backend's documented locking behavior must be configured and understood; this behavior should be assessed against the concrete need to accept new backend settings without copying old state and avoid hardcoding secret authentication fields in HCL or init flags. The second measure is intended to share selected information from another state rather than taking over its resources: The built-in data source consumes outputs from a different state; it does not give Terraform lifecycle ownership of the remote objects stored there; this behavior should be assessed against the concrete need to accept new backend settings without copying old state and avoid hardcoding secret authentication fields in HCL or init flags. Neither is the directly designated method for the separate goals of accept new backend settings without copying old state and avoid hardcoding secret authentication fields in HCL or init flags in this review.
B:The second measure does meet the avoid hardcoding secret authentication fields in HCL or init flags requirement, but the first is designed for another concern: Terraform initializes its backend before normal expression evaluation and variable processing; use supported partial configuration mechanisms instead; this behavior should be assessed against the concrete need to accept new backend settings without copying old state and avoid hardcoding secret authentication fields in HCL or init flags. That first component is designed to avoid treating backend setup like an ordinary runtime variable evaluation, which does not accomplish the requested task to accept new backend settings without copying old state, even though the other measure satisfies avoid hardcoding secret authentication fields in HCL or init flags.
D:The first measure meets the requirement to accept new backend settings without copying old state, but its partner serves a different role: Terraform's migration workflow handles state snapshots and workspace considerations; manual files copied to the wrong state key can cause unexpected destructive plans; this behavior should be assessed against the concrete need to accept new backend settings without copying old state and avoid hardcoding secret authentication fields in HCL or init flags. That second component is designed to preserve state metadata while switching storage, so the still-missing criterion is to avoid hardcoding secret authentication fields in HCL or init flags, while the first criterion remains accept new backend settings without copying old state.
Question 578
An operator finds differences between state and reality. The requirement is to add an unmanaged object into the current state under a declared address. Which Terraform mechanism directly meets this requirement?
- Avoid editing raw state JSON
- Use
terraform state list to inspect bindings
- Use an
import block to adopt a preexisting object
- Treat out-of-band tag updates as drift
Explanation
Correct Answer
C:Import maps a remote ID to resource configuration; it does not automatically create the imported infrastructure from scratch; this behavior should be assessed against the concrete need to add an unmanaged object into the current state under a declared address. This directly supports the task to add an unmanaged object into the current state under a declared address during an automated release.
Incorrect Answers
A:Supported state commands and declarative refactoring blocks are safer; incorrect manual edits can make future plans target the wrong objects; this behavior should be assessed against the concrete need to add an unmanaged object into the current state under a declared address. The stated requirement is to add an unmanaged object into the current state under a declared address, not to prevent inconsistent serials, lineages, attributes, and provider references; this alternative addresses a different control or phase.
B:The command reports addresses, not a complete catalog of provider-side objects; unmanaged objects will not appear; this behavior should be assessed against the concrete need to add an unmanaged object into the current state under a declared address. That can be useful when the aim is to enumerate the tracked resource addresses in the selected state, but it does not directly deliver the requested ability to add an unmanaged object into the current state under a declared address.
D:Terraform may plan to restore declared tags unless lifecycle rules deliberately ignore certain changes; the external edit does not automatically rewrite HCL; this behavior should be assessed against the concrete need to add an unmanaged object into the current state under a declared address. It may support a related workflow, but the question specifically requires the mechanism for add an unmanaged object into the current state under a declared address rather than understand reconciliation when provider-observed values differ from HCL.
Question 579
A Terraform rollout has separate acceptance criteria: control storage without editing internal state JSON manually and include state confidentiality in developer-machine security. Which combined approach directly satisfies the two criteria?
- Change local state file paths via backend configuration + Use CLI workspaces for separate local state snapshots
- Change local state file paths via backend configuration + Use the default
local backend
- Use a remote backend for collaborative state + Protect local workstation backups
- Keep local state out of Git + Avoid deleting state to repair an ordinary HCL error
- Set
backend "local" { path = "..." } + Protect local workstation backups
- Change local state file paths via backend configuration + Protect local workstation backups
Explanation
Correct Answer
F:For the first criterion, a backend path setting governs where the state is written; manual alteration of state bindings can cause damaging reconciliation errors; this behavior should be assessed against the concrete need to control storage without editing internal state JSON manually and include state confidentiality in developer-machine security; this directly addresses the need to control storage without editing internal state JSON manually. For the separate second criterion, copies of state and plan files can expose provider-returned secrets; encrypting disks and limiting file access remain important even for demonstration environments; this behavior should be assessed against the concrete need to control storage without editing internal state JSON manually and include state confidentiality in developer-machine security; this fulfills the need to include state confidentiality in developer-machine security. Together they cover the independent tasks of control storage without editing internal state JSON manually and include state confidentiality in developer-machine security without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure meets the requirement to control storage without editing internal state JSON manually, but its partner serves a different role: Terraform CLI workspaces select different state instances; local nondefault workspaces use workspace-specific file locations; they do not establish HCP workspace permissions; this behavior should be assessed against the concrete need to control storage without editing internal state JSON manually and include state confidentiality in developer-machine security. That second component is designed to isolate environments while sharing the same root configuration, so the still-missing criterion is to include state confidentiality in developer-machine security, while the first criterion remains control storage without editing internal state JSON manually.
B:The first measure meets the requirement to control storage without editing internal state JSON manually, but its partner serves a different role: By default Terraform writes state in the working directory, typically terraform.tfstate; local storage does not supply shared team coordination; this behavior should be assessed against the concrete need to control storage without editing internal state JSON manually and include state confidentiality in developer-machine security. That second component is designed to store state in a local filesystem file without configuring a remote backend, so the still-missing criterion is to include state confidentiality in developer-machine security, while the first criterion remains control storage without editing internal state JSON manually.
C:The second measure does meet the include state confidentiality in developer-machine security requirement, but the first is designed for another concern: Remote state centralizes updates and often supports distributed locking; this reduces the risk of divergent local state files; this behavior should be assessed against the concrete need to control storage without editing internal state JSON manually and include state confidentiality in developer-machine security. That first component is designed to share one authoritative object mapping across team members, which does not accomplish the requested task to control storage without editing internal state JSON manually, even though the other measure satisfies include state confidentiality in developer-machine security.
D:The first measure is intended to avoid exposing sensitive resource attributes in repository history: State can contain secrets even if outputs are redacted; a version-control checkout is not a secure state database or concurrency mechanism; this behavior should be assessed against the concrete need to control storage without editing internal state JSON manually and include state confidentiality in developer-machine security. The second measure is intended to prevent Terraform from losing track of existing objects: Removing state does not delete remote objects, but it removes their managed mappings; a later plan may attempt duplicate creation rather than fixing source syntax; this behavior should be assessed against the concrete need to control storage without editing internal state JSON manually and include state confidentiality in developer-machine security. Neither is the directly designated method for the separate goals of control storage without editing internal state JSON manually and include state confidentiality in developer-machine security in this review.
E:The second measure does meet the include state confidentiality in developer-machine security requirement, but the first is designed for another concern: The local backend supports configuring where state data is stored; this changes file location, not provider credentials or resource addresses; this behavior should be assessed against the concrete need to control storage without editing internal state JSON manually and include state confidentiality in developer-machine security. That first component is designed to choose a nondefault local state file location, which does not accomplish the requested task to control storage without editing internal state JSON manually, even though the other measure satisfies include state confidentiality in developer-machine security.
Question 580
A Terraform review separates 2 requirements: (1) prevent simultaneous runs from overwriting shared state; (2) clear a stale lock when the original owner is definitely inactive. Identify the two features that each directly handle one of those requirements. Choose TWO.
- Recognize lock ownership metadata
- Use a backend with state locking
- Avoid
-lock=false for shared production state
- Wait for a held lock to be released
- Use
terraform force-unlock LOCK_ID only after verification
Explanation
Correct Answers
B:Backends that support locking serialize state-changing operations; this guards consistency but does not replace change approval; this behavior should be assessed against the concrete need to prevent simultaneous runs from overwriting shared state and clear a stale lock when the original owner is definitely inactive. This matches the distinct objective to prevent simultaneous runs from overwriting shared state; the remaining chosen features address clear a stale lock when the original owner is definitely inactive.
E:Force-unlock bypasses normal safeguards and can permit conflicting state writes; the lock ID helps ensure the intended lock is targeted; this behavior should be assessed against the concrete need to prevent simultaneous runs from overwriting shared state and clear a stale lock when the original owner is definitely inactive. This matches the distinct objective to clear a stale lock when the original owner is definitely inactive; the remaining chosen features address prevent simultaneous runs from overwriting shared state.
Incorrect Answers
A:Lock reports can include identifying information about the holder and operation; investigate the legitimate owner before overriding anything; this behavior should be assessed against the concrete need to prevent simultaneous runs from overwriting shared state and clear a stale lock when the original owner is definitely inactive. Its main application is to diagnose whether another run or process holds a state lock; the checklist instead asks for prevent simultaneous runs from overwriting shared state; and clear a stale lock when the original owner is definitely inactive. None of those distinct criteria specifically calls for this alternative.
C:Disabling locking increases risk of simultaneous updates and state corruption; it is not a substitute for resolving a stale lock; this behavior should be assessed against the concrete need to prevent simultaneous runs from overwriting shared state and clear a stale lock when the original owner is definitely inactive. Its main application is to keep concurrency protection during normal writes; the checklist instead asks for prevent simultaneous runs from overwriting shared state; and clear a stale lock when the original owner is definitely inactive. None of those distinct criteria specifically calls for this alternative.
D:A lock usually means another process is modifying the same state; waiting is safer than forcing unlock while the first run is still active; this behavior should be assessed against the concrete need to prevent simultaneous runs from overwriting shared state and clear a stale lock when the original owner is definitely inactive. Its main application is to avoid interrupting an active legitimate Terraform operation; the checklist instead asks for prevent simultaneous runs from overwriting shared state; and clear a stale lock when the original owner is definitely inactive. None of those distinct criteria specifically calls for this alternative.