Question 180
In a reusable deployment, the primary objective is to place an isolated sandbox state file away from another lab's state. Which mechanism most directly meets this particular need?
- Custom local state path
- Local state backup
- Local backend and shared CI
- Default local state storage
Explanation
Correct Answer
A:The task is to place an isolated sandbox state file away from another lab's state; Custom local state path directly supports that requirement: A local backend path can separate state storage from another configuration's snapshot. Its relevant boundary is: State location alone does not separate permissions for remote provider resources.
Incorrect Answers
B:Local state backup is designed to retain a prior state snapshot while modifying local state, whereas this task is to place an isolated sandbox state file away from another lab's state: Local state operations commonly create backup snapshots to aid recovery from mistakes. Against Custom local state path, its limitation is: A backup does not make concurrent state modifications safe.
C:Local backend and shared CI is designed to avoid using workstation files as the source of truth for team deployments, whereas this task is to place an isolated sandbox state file away from another lab's state: Local state is best suited to isolated or experimental work rather than competing team runners. Against Custom local state path, its limitation is: Copying a state file between computers is error-prone and can leak secrets.
D:Default local state storage addresses the different requirement to keep a standalone project's state on its local filesystem: Without a configured remote backend, Terraform ordinarily stores state locally in terraform.tfstate; this does not by itself satisfy the requested task to place an isolated sandbox state file away from another lab's state. For the stated need, Custom local state path is the more direct mechanism.
Question 181
An engineer must update an existing Terraform workflow to find documented reusable modules rather than copying configurations manually. Which mechanism most directly meets this particular need?
- Registry module version selection
- Module discovery in registry
- Pinned Git module ref
- Module source subdirectory
- Local child module source
Explanation
Correct Answer
B:The task is to find documented reusable modules rather than copying configurations manually; Module discovery in registry directly supports that requirement: The Terraform Registry and private module registries can publish modules with inputs and outputs. Its relevant boundary is: A published module can still depend on provider permissions and external objects.
Incorrect Answers
A:Registry module version selection is designed to choose an explicit compatible release of a registry module, whereas this task is to find documented reusable modules rather than copying configurations manually: The version argument on a registry module call constrains which published module release is installed. Against Module discovery in registry, its limitation is: The version argument is not supported for arbitrary local path modules.
C:Pinned Git module ref is designed to use a chosen module branch, tag, or commit from a Git source, whereas this task is to find documented reusable modules rather than copying configurations manually: A Git module source can use ?ref=... to select the intended revision. Against Module discovery in registry, its limitation is: A floating branch can change over time and weaken reproducibility.
D:Module source subdirectory is designed to select a Terraform module within a larger repository, whereas this task is to find documented reusable modules rather than copying configurations manually: The double-slash syntax in supported remote sources identifies a module subdirectory within the downloaded package. Against Module discovery in registry, its limitation is: The path suffix does not change provider plugin version selection.
E:Local child module source is designed to load a reusable module from a directory in the same repository, whereas this task is to find documented reusable modules rather than copying configurations manually: A source like ./modules/network points a module call at a local filesystem path. Against Module discovery in registry, its limitation is: Local module paths do not use registry module version arguments.
Question 182
A Terraform operator is specifically tasked to execute Terraform with network access to private environments. Which mechanism most directly meets this particular need?
- HCP Terraform agent
- HCP Terraform remote execution
- HCP Terraform workspace
- VCS-driven HCP Terraform workflow
- HCP Terraform state storage
Explanation
Correct Answer
A:The task is to execute Terraform with network access to private environments; HCP Terraform agent directly supports that requirement: An HCP Terraform agent can run work in an operator-controlled environment and connect to private resources. Its relevant boundary is: An agent requires setup and does not make inaccessible endpoints public.
Incorrect Answers
B:HCP Terraform remote execution is designed to execute Terraform operations in a managed remote runtime, whereas this task is to execute Terraform with network access to private environments: HCP Terraform can run plans and applies outside a developer's workstation under workspace controls. Against HCP Terraform agent, its limitation is: Remote execution still needs provider credentials and connectivity.
C:HCP Terraform workspace is designed to isolate the state, variables, and run history for one managed infrastructure unit, whereas this task is to execute Terraform with network access to private environments: An HCP Terraform workspace organizes a Terraform run context with its own state and configuration connection. Against HCP Terraform agent, its limitation is: It is not identical to a local CLI workspace's implementation.
D:VCS-driven HCP Terraform workflow is designed to start remote plans from connected version-control updates, whereas this task is to execute Terraform with network access to private environments: A VCS-connected workspace can queue runs when matching configuration changes are committed. Against HCP Terraform agent, its limitation is: Its workspace settings determine whether runs need approval or are automatically applied.
E:HCP Terraform state storage is designed to store workspace state centrally rather than on a personal machine, whereas this task is to execute Terraform with network access to private environments: HCP Terraform manages workspace state snapshots with controlled access and history. Against HCP Terraform agent, its limitation is: Central state storage does not guarantee infrastructure can be reached from every execution mode.
Question 183
A colleague recommends the Terraform concept "Implicit resource dependency". Which use case best matches it?
- ensure a dependent resource waits for a referenced upstream attribute
- use a value explicitly exported by a child module
- avoid assuming files or block order determines operations
- refer to the current managed object in its own provisioner context
Explanation
Correct Answer
A:The practical result of Implicit resource dependency, used to ensure a dependent resource waits for a referenced upstream attribute, is: Terraform infers dependencies when expressions reference other resources. A qualification for this effect is: An explicit depends_on is unnecessary for relationships already expressed through references.
Incorrect Answers
B:That outcome applies to Module output reference, intended to use a value explicitly exported by a child module, rather than the question's feature Implicit resource dependency: The parent reads a child output through module.name.output_name rather than reaching into child internals. Unlike Module output reference, Implicit resource dependency is intended to ensure a dependent resource waits for a referenced upstream attribute, not to use a value explicitly exported by a child module.
C:That outcome applies to Reference-based evaluation order, intended to avoid assuming files or block order determines operations, rather than the question's feature Implicit resource dependency: Terraform's graph follows expression dependencies, not the physical line order of configuration blocks. Unlike Reference-based evaluation order, Implicit resource dependency is intended to ensure a dependent resource waits for a referenced upstream attribute, not to avoid assuming files or block order determines operations.
D:That outcome applies to Self reference in provisioners, intended to refer to the current managed object in its own provisioner context, rather than the question's feature Implicit resource dependency: The self object is available in supported provisioner and connection contexts for the containing resource. Unlike Self reference in provisioners, Implicit resource dependency is intended to ensure a dependent resource waits for a referenced upstream attribute, not to refer to the current managed object in its own provisioner context.
Question 184
An engineer must update an existing Terraform workflow to record intended infrastructure settings under version control. Which mechanism most directly meets this particular need?
- Idempotent reconciliation
- Infrastructure execution plan
- Infrastructure provider API
- Desired configuration
Explanation
Correct Answer
D:The task is to record intended infrastructure settings under version control; Desired configuration directly supports that requirement: Configuration expresses the operator's intended infrastructure and is the starting point for planning. Its relevant boundary is: The file alone does not reveal every live change made outside Terraform.
Incorrect Answers
A:Idempotent reconciliation is designed to repeat an apply without recreating already matching resources, whereas this task is to record intended infrastructure settings under version control: Terraform compares desired configuration with prior state and refreshed remote information and normally plans no change when they agree. Against Desired configuration, its limitation is: An external drift or changed input can still cause a nonempty plan.
B:Infrastructure execution plan is designed to preview the proposed actions before changing real resources, whereas this task is to record intended infrastructure settings under version control: A Terraform plan calculates proposed actions from configuration, state, providers, and current observations. Against Desired configuration, its limitation is: Reviewing a plan is different from committing its effects to the remote system.
C:Infrastructure provider API is designed to translate declarative resources into operations on a platform, whereas this task is to record intended infrastructure settings under version control: Provider plugins supply resource implementations and call remote APIs when Terraform reconciles infrastructure. Against Desired configuration, its limitation is: Terraform Core does not hard-code each cloud service API.
Question 185
The deployment owner requests a reliable way to adopt a remote object from the correct account or region. Which mechanism most directly meets this particular need?
- Import without recreation
- Import validation follow-up
- Import under aliased provider
- Generate import configuration where supported
Explanation
Correct Answer
C:The task is to adopt a remote object from the correct account or region; Import under aliased provider directly supports that requirement: The target resource's selected provider configuration determines how Terraform locates and reads the imported object. Its relevant boundary is: The wrong account's credentials may fail even if an ID format looks valid.
Incorrect Answers
A:Import without recreation is designed to adopt an existing object rather than creating a new duplicate, whereas this task is to adopt a remote object from the correct account or region: Import connects an existing provider object to the Terraform state mapping. Against Import under aliased provider, its limitation is: A post-import plan must still be checked for configuration differences.
B:Import validation follow-up is designed to run a plan after importing an object to check unexpected updates, whereas this task is to adopt a remote object from the correct account or region: A post-import plan reveals whether declared settings match the newly adopted remote object. Against Import under aliased provider, its limitation is: Import success alone does not prove the next apply is a no-op.
D:Generate import configuration where supported is designed to use import planning support to help write resource HCL for an existing object, whereas this task is to adopt a remote object from the correct account or region: Terraform supports generating configuration with appropriate import workflows for certain imported resources. Against Import under aliased provider, its limitation is: Generated HCL requires review and may include attributes needing cleanup.
Question 186
A configuration walkthrough identifies "Plan inspection checkpoint". Which task is it principally intended to support?
- review planned deletion before permitting an irreversible action
- reason about dependencies before Terraform proposes remote operations
- separate proposing infrastructure changes from authorizing them
- follow the core workflow from configuration to deliberate execution
Explanation
Correct Answer
A:The practical result of Plan inspection checkpoint, used to review planned deletion before permitting an irreversible action, is: A review of change symbols and affected addresses can reveal unexpected destroy or replacement operations. A qualification for this effect is: A green validation result cannot substitute for plan review.
Incorrect Answers
B:That outcome applies to Plan refresh and graph evaluation, intended to reason about dependencies before Terraform proposes remote operations, rather than the question's feature Plan inspection checkpoint: Terraform evaluates configuration, state, and provider information to construct an action graph. Unlike Plan refresh and graph evaluation, Plan inspection checkpoint is intended to review planned deletion before permitting an irreversible action, not to reason about dependencies before Terraform proposes remote operations.
C:That outcome applies to Collaborative review before apply, intended to separate proposing infrastructure changes from authorizing them, rather than the question's feature Plan inspection checkpoint: Teams can share configuration and review a Terraform plan before a privileged apply runs. Unlike Collaborative review before apply, Plan inspection checkpoint is intended to review planned deletion before permitting an irreversible action, not to separate proposing infrastructure changes from authorizing them.
D:That outcome applies to Write-plan-apply lifecycle, intended to follow the core workflow from configuration to deliberate execution, rather than the question's feature Plan inspection checkpoint: The core workflow involves writing configuration, initializing, planning, then applying intended changes. Unlike Write-plan-apply lifecycle, Plan inspection checkpoint is intended to review planned deletion before permitting an irreversible action, not to follow the core workflow from configuration to deliberate execution.
Question 187
A Terraform runbook describes the mechanism "Custom local state path". Which responsibility should a reviewer associate with it?
- avoid using workstation files as the source of truth for team deployments
- retain a prior state snapshot while modifying local state
- prevent unauthorized reading of saved infrastructure metadata
- place an isolated sandbox state file away from another lab's state
Explanation
Correct Answer
D:The practical result of Custom local state path, used to place an isolated sandbox state file away from another lab's state, is: A local backend path can separate state storage from another configuration's snapshot. A qualification for this effect is: State location alone does not separate permissions for remote provider resources.
Incorrect Answers
A:That outcome applies to Local backend and shared CI, intended to avoid using workstation files as the source of truth for team deployments, rather than the question's feature Custom local state path: Local state is best suited to isolated or experimental work rather than competing team runners. Unlike Local backend and shared CI, Custom local state path is intended to place an isolated sandbox state file away from another lab's state, not to avoid using workstation files as the source of truth for team deployments.
B:That outcome applies to Local state backup, intended to retain a prior state snapshot while modifying local state, rather than the question's feature Custom local state path: Local state operations commonly create backup snapshots to aid recovery from mistakes. Unlike Local state backup, Custom local state path is intended to place an isolated sandbox state file away from another lab's state, not to retain a prior state snapshot while modifying local state.
C:That outcome applies to Local state access controls, intended to prevent unauthorized reading of saved infrastructure metadata, rather than the question's feature Custom local state path: Filesystem permissions and secure workstation handling matter when state stays local. Unlike Local state access controls, Custom local state path is intended to place an isolated sandbox state file away from another lab's state, not to prevent unauthorized reading of saved infrastructure metadata.
Question 188
The team is documenting risks of Implicit resource dependency while planning to ensure a dependent resource waits for a referenced upstream attribute. Which caveat specifically applies to that mechanism?
- It is not a general replacement for cross-resource references.
- References can still form invalid cycles if dependencies point back to each other.
- Unexported child resource attributes are not directly available to the caller.
- An explicit depends_on is unnecessary for relationships already expressed through references.
Explanation
Correct Answer
D:For Implicit resource dependency in the task to ensure a dependent resource waits for a referenced upstream attribute, the important caution is: An explicit depends_on is unnecessary for relationships already expressed through references. The reason this matters is its actual behavior: Terraform infers dependencies when expressions reference other resources.
Incorrect Answers
A:The proposed warning belongs to Self reference in provisioners, which serves the different goal to refer to the current managed object in its own provisioner context, rather than to Implicit resource dependency: The self object is available in supported provisioner and connection contexts for the containing resource. The question concerns Implicit resource dependency acting to ensure a dependent resource waits for a referenced upstream attribute, not a limit of Self reference in provisioners.
B:The proposed warning belongs to Reference-based evaluation order, which serves the different goal to avoid assuming files or block order determines operations, rather than to Implicit resource dependency: Terraform's graph follows expression dependencies, not the physical line order of configuration blocks. The question concerns Implicit resource dependency acting to ensure a dependent resource waits for a referenced upstream attribute, not a limit of Reference-based evaluation order.
C:The proposed warning belongs to Module output reference, which serves the different goal to use a value explicitly exported by a child module, rather than to Implicit resource dependency: The parent reads a child output through module.name.output_name rather than reaching into child internals. The question concerns Implicit resource dependency acting to ensure a dependent resource waits for a referenced upstream attribute, not a limit of Module output reference.
Question 189
A colleague recommends the Terraform concept "Module discovery in registry". Which use case best matches it?
- choose an explicit compatible release of a registry module
- select a Terraform module within a larger repository
- find documented reusable modules rather than copying configurations manually
- use a chosen module branch, tag, or commit from a Git source
Explanation
Correct Answer
C:The practical result of Module discovery in registry, used to find documented reusable modules rather than copying configurations manually, is: The Terraform Registry and private module registries can publish modules with inputs and outputs. A qualification for this effect is: A published module can still depend on provider permissions and external objects.
Incorrect Answers
A:That outcome applies to Registry module version selection, intended to choose an explicit compatible release of a registry module, rather than the question's feature Module discovery in registry: The version argument on a registry module call constrains which published module release is installed. Unlike Registry module version selection, Module discovery in registry is intended to find documented reusable modules rather than copying configurations manually, not to choose an explicit compatible release of a registry module.
B:That outcome applies to Module source subdirectory, intended to select a Terraform module within a larger repository, rather than the question's feature Module discovery in registry: The double-slash syntax in supported remote sources identifies a module subdirectory within the downloaded package. Unlike Module source subdirectory, Module discovery in registry is intended to find documented reusable modules rather than copying configurations manually, not to select a Terraform module within a larger repository.
D:That outcome applies to Pinned Git module ref, intended to use a chosen module branch, tag, or commit from a Git source, rather than the question's feature Module discovery in registry: A Git module source can use ?ref=... to select the intended revision. Unlike Pinned Git module ref, Module discovery in registry is intended to find documented reusable modules rather than copying configurations manually, not to use a chosen module branch, tag, or commit from a Git source.
Question 190
During an implementation review, a Terraform team encounters "HCP Terraform agent". Which purpose is associated with that mechanism?
- execute Terraform with network access to private environments
- isolate the state, variables, and run history for one managed infrastructure unit
- execute Terraform operations in a managed remote runtime
- start remote plans from connected version-control updates
Explanation
Correct Answer
A:The practical result of HCP Terraform agent, used to execute Terraform with network access to private environments, is: An HCP Terraform agent can run work in an operator-controlled environment and connect to private resources. A qualification for this effect is: An agent requires setup and does not make inaccessible endpoints public.
Incorrect Answers
B:That outcome applies to HCP Terraform workspace, intended to isolate the state, variables, and run history for one managed infrastructure unit, rather than the question's feature HCP Terraform agent: An HCP Terraform workspace organizes a Terraform run context with its own state and configuration connection. Unlike HCP Terraform workspace, HCP Terraform agent is intended to execute Terraform with network access to private environments, not to isolate the state, variables, and run history for one managed infrastructure unit.
C:That outcome applies to HCP Terraform remote execution, intended to execute Terraform operations in a managed remote runtime, rather than the question's feature HCP Terraform agent: HCP Terraform can run plans and applies outside a developer's workstation under workspace controls. Unlike HCP Terraform remote execution, HCP Terraform agent is intended to execute Terraform with network access to private environments, not to execute Terraform operations in a managed remote runtime.
D:That outcome applies to VCS-driven HCP Terraform workflow, intended to start remote plans from connected version-control updates, rather than the question's feature HCP Terraform agent: A VCS-connected workspace can queue runs when matching configuration changes are committed. Unlike VCS-driven HCP Terraform workflow, HCP Terraform agent is intended to execute Terraform with network access to private environments, not to start remote plans from connected version-control updates.