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.
Question 191
A configuration walkthrough identifies "terraform providers lock". Which task is it principally intended to support?
- restrict acceptable versions of an infrastructure provider
- keep selected provider versions reproducible between runs
- identify the namespace and provider plugin that Terraform should install
- ask initialization to reconsider allowed provider selections
- populate or update provider checksum selections in the lock file
Explanation
Correct Answer
E:The practical result of terraform providers lock, used to populate or update provider checksum selections in the lock file, is: The providers lock command can record provider package checksums for selected target platforms. A qualification for this effect is: It is not the command that downloads and configures all root-module infrastructure.
Incorrect Answers
A:That outcome applies to Provider version constraint, intended to restrict acceptable versions of an infrastructure provider, rather than the question's feature terraform providers lock: The version argument in required_providers expresses allowed provider versions, such as a compatible release series. Unlike Provider version constraint, terraform providers lock is intended to populate or update provider checksum selections in the lock file, not to restrict acceptable versions of an infrastructure provider.
B:That outcome applies to Terraform dependency lock file, intended to keep selected provider versions reproducible between runs, rather than the question's feature terraform providers lock: The .terraform.lock.hcl file records resolved provider versions and checksums for repeatable installation. Unlike Terraform dependency lock file, terraform providers lock is intended to populate or update provider checksum selections in the lock file, not to keep selected provider versions reproducible between runs.
C:That outcome applies to required_providers source, intended to identify the namespace and provider plugin that Terraform should install, rather than the question's feature terraform providers lock: The required_providers map supplies a provider source address such as hashicorp/aws for dependency resolution. Unlike required_providers source, terraform providers lock is intended to populate or update provider checksum selections in the lock file, not to identify the namespace and provider plugin that Terraform should install.
D:That outcome applies to terraform init -upgrade, intended to ask initialization to reconsider allowed provider selections, rather than the question's feature terraform providers lock: Using -upgrade during init allows newer versions satisfying the configured provider constraints to be selected. Unlike terraform init -upgrade, terraform providers lock is intended to populate or update provider checksum selections in the lock file, not to ask initialization to reconsider allowed provider selections.
Question 192
A Terraform rollout has two separate requirements: first, ensure a dependent resource waits for a referenced upstream attribute; second, refer to an instance selected by its map or set key. Which assignment of mechanisms correctly handles both responsibilities?
- First use Module output reference; then use Self reference in provisioners.
- First use Implicit resource dependency; then use Module output reference.
- First use Self reference in provisioners; then use Resource address for for_each instance.
- First use Implicit resource dependency; then use Resource address for for_each instance.
- First use Resource address for for_each instance; then use Implicit resource dependency.
Explanation
Correct Answer
D:The first requirement, to ensure a dependent resource waits for a referenced upstream attribute, is handled by Implicit resource dependency: Terraform infers dependencies when expressions reference other resources. The second requirement, to refer to an instance selected by its map or set key, is handled by Resource address for for_each instance: A for_each resource uses keyed addressing such as example["prod"] and exposes a key-specific object. Each of these mechanisms has a distinct responsibility.
Incorrect Answers
A:For the requested tasks to ensure a dependent resource waits for a referenced upstream attribute and refer to an instance selected by its map or set key, the first candidate Module output reference addresses use a value explicitly exported by a child module; the second candidate Self reference in provisioners addresses refer to the current managed object in its own provisioner context. This mapping fails because the first mechanism primarily supports the task to use a value explicitly exported by a child module and the second mechanism primarily supports the task to refer to the current managed object in its own provisioner context; the actual requirements are ensure a dependent resource waits for a referenced upstream attribute first and refer to an instance selected by its map or set key second.
B:For the requested tasks to ensure a dependent resource waits for a referenced upstream attribute and refer to an instance selected by its map or set key, the first candidate Implicit resource dependency addresses ensure a dependent resource waits for a referenced upstream attribute; the second candidate Module output reference addresses use a value explicitly exported by a child module. This mapping fails because the second mechanism primarily supports the task to use a value explicitly exported by a child module; the actual requirements are ensure a dependent resource waits for a referenced upstream attribute first and refer to an instance selected by its map or set key second.
C:For the requested tasks to ensure a dependent resource waits for a referenced upstream attribute and refer to an instance selected by its map or set key, the first candidate Self reference in provisioners addresses refer to the current managed object in its own provisioner context; the second candidate Resource address for for_each instance addresses refer to an instance selected by its map or set key. This mapping fails because the first mechanism primarily supports the task to refer to the current managed object in its own provisioner context; the actual requirements are ensure a dependent resource waits for a referenced upstream attribute first and refer to an instance selected by its map or set key second.
E:For the requested tasks to ensure a dependent resource waits for a referenced upstream attribute and refer to an instance selected by its map or set key, the first candidate Resource address for for_each instance addresses refer to an instance selected by its map or set key; the second candidate Implicit resource dependency addresses ensure a dependent resource waits for a referenced upstream attribute. This mapping fails because the first mechanism primarily supports the task to refer to an instance selected by its map or set key and the second mechanism primarily supports the task to ensure a dependent resource waits for a referenced upstream attribute; the actual requirements are ensure a dependent resource waits for a referenced upstream attribute first and refer to an instance selected by its map or set key second.
Question 193
A change proposal relies on Plan inspection checkpoint for the task to review planned deletion before permitting an irreversible action. Which limitation specifically applies to it?
- A green validation result cannot substitute for plan review.
- Version control approval alone does not guarantee the exact reviewed plan is used.
- Destroy and import are maintenance actions rather than steps in every routine run.
- The graph is not simply a sequential list ordered by file line number.
Explanation
Correct Answer
A:For Plan inspection checkpoint in the task to review planned deletion before permitting an irreversible action, the important caution is: A green validation result cannot substitute for plan review. The reason this matters is its actual behavior: A review of change symbols and affected addresses can reveal unexpected destroy or replacement operations.
Incorrect Answers
B:The proposed warning belongs to Collaborative review before apply, which serves the different goal to separate proposing infrastructure changes from authorizing them, rather than to Plan inspection checkpoint: Teams can share configuration and review a Terraform plan before a privileged apply runs. The question concerns Plan inspection checkpoint acting to review planned deletion before permitting an irreversible action, not a limit of Collaborative review before apply.
C:The proposed warning belongs to Write-plan-apply lifecycle, which serves the different goal to follow the core workflow from configuration to deliberate execution, rather than to Plan inspection checkpoint: The core workflow involves writing configuration, initializing, planning, then applying intended changes. The question concerns Plan inspection checkpoint acting to review planned deletion before permitting an irreversible action, not a limit of Write-plan-apply lifecycle.
D:The proposed warning belongs to Plan refresh and graph evaluation, which serves the different goal to reason about dependencies before Terraform proposes remote operations, rather than to Plan inspection checkpoint: Terraform evaluates configuration, state, and provider information to construct an action graph. The question concerns Plan inspection checkpoint acting to review planned deletion before permitting an irreversible action, not a limit of Plan refresh and graph evaluation.
Question 194
The rollout owner asks whether Custom local state path is sufficient to place an isolated sandbox state file away from another lab's state. Which limitation specifically concerns that mechanism?
- A local backend cannot by itself provide shared policy controls or central audit.
- A backup does not make concurrent state modifications safe.
- A local file does not provide multi-user remote collaboration guarantees.
- State location alone does not separate permissions for remote provider resources.
Explanation
Correct Answer
D:For Custom local state path in the task to place an isolated sandbox state file away from another lab's state, the important caution is: State location alone does not separate permissions for remote provider resources. The reason this matters is its actual behavior: A local backend path can separate state storage from another configuration's snapshot.
Incorrect Answers
A:The proposed warning belongs to Local state access controls, which serves the different goal to prevent unauthorized reading of saved infrastructure metadata, rather than to Custom local state path: Filesystem permissions and secure workstation handling matter when state stays local. The question concerns Custom local state path acting to place an isolated sandbox state file away from another lab's state, not a limit of Local state access controls.
B:The proposed warning belongs to Local state backup, which serves the different goal to retain a prior state snapshot while modifying local state, rather than to Custom local state path: Local state operations commonly create backup snapshots to aid recovery from mistakes. The question concerns Custom local state path acting to place an isolated sandbox state file away from another lab's state, not a limit of Local state backup.
C:The listed caution belongs specifically to Default local state storage, used to keep a standalone project's state on its local filesystem: Without a configured remote backend, Terraform ordinarily stores state locally in terraform.tfstate; the feature under review is instead Custom local state path, so this answer attaches another feature's qualification to the wrong mechanism.
Question 195
A colleague recommends the Terraform concept "Desired configuration". Which use case best matches it?
- preview the proposed actions before changing real resources
- repeat an apply without recreating already matching resources
- translate declarative resources into operations on a platform
- represent desired infrastructure in reviewable configuration files
- record intended infrastructure settings under version control
Explanation
Correct Answer
E:The practical result of Desired configuration, used to record intended infrastructure settings under version control, is: Configuration expresses the operator's intended infrastructure and is the starting point for planning. A qualification for this effect is: The file alone does not reveal every live change made outside Terraform.
Incorrect Answers
A:That outcome applies to Infrastructure execution plan, intended to preview the proposed actions before changing real resources, rather than the question's feature Desired configuration: A Terraform plan calculates proposed actions from configuration, state, providers, and current observations. Unlike Infrastructure execution plan, Desired configuration is intended to record intended infrastructure settings under version control, not to preview the proposed actions before changing real resources.
B:That outcome applies to Idempotent reconciliation, intended to repeat an apply without recreating already matching resources, rather than the question's feature Desired configuration: Terraform compares desired configuration with prior state and refreshed remote information and normally plans no change when they agree. Unlike Idempotent reconciliation, Desired configuration is intended to record intended infrastructure settings under version control, not to repeat an apply without recreating already matching resources.
C:That outcome applies to Infrastructure provider API, intended to translate declarative resources into operations on a platform, rather than the question's feature Desired configuration: Provider plugins supply resource implementations and call remote APIs when Terraform reconciles infrastructure. Unlike Infrastructure provider API, Desired configuration is intended to record intended infrastructure settings under version control, not to translate declarative resources into operations on a platform.
D:That outcome applies to Infrastructure as code definition, intended to represent desired infrastructure in reviewable configuration files, rather than the question's feature Desired configuration: Infrastructure as code describes infrastructure through machine-readable files instead of relying only on manual console operations. Unlike Infrastructure as code definition, Desired configuration is intended to record intended infrastructure settings under version control, not to represent desired infrastructure in reviewable configuration files.
Question 196
A change proposal relies on Module discovery in registry for the task to find documented reusable modules rather than copying configurations manually. Which limitation specifically applies to it?
- A published module can still depend on provider permissions and external objects.
- A floating branch can change over time and weaken reproducibility.
- The path suffix does not change provider plugin version selection.
- Local module paths do not use registry module version arguments.
Explanation
Correct Answer
A:For Module discovery in registry in the task to find documented reusable modules rather than copying configurations manually, the important caution is: A published module can still depend on provider permissions and external objects. The reason this matters is its actual behavior: The Terraform Registry and private module registries can publish modules with inputs and outputs.
Incorrect Answers
B:The proposed warning belongs to Pinned Git module ref, which serves the different goal to use a chosen module branch, tag, or commit from a Git source, rather than to Module discovery in registry: A Git module source can use ?ref=... to select the intended revision. The question concerns Module discovery in registry acting to find documented reusable modules rather than copying configurations manually, not a limit of Pinned Git module ref.
C:The proposed warning belongs to Module source subdirectory, which serves the different goal to select a Terraform module within a larger repository, rather than to Module discovery in registry: The double-slash syntax in supported remote sources identifies a module subdirectory within the downloaded package. The question concerns Module discovery in registry acting to find documented reusable modules rather than copying configurations manually, not a limit of Module source subdirectory.
D:The listed caution belongs specifically to Local child module source, used to load a reusable module from a directory in the same repository: A source like ./modules/network points a module call at a local filesystem path; the feature under review is instead Module discovery in registry, so this answer attaches another feature's qualification to the wrong mechanism.
Question 197
Before adopting HCP Terraform agent to execute Terraform with network access to private environments, which statement sets an accurate boundary?
- It is not identical to a local CLI workspace's implementation.
- Its workspace settings determine whether runs need approval or are automatically applied.
- An agent requires setup and does not make inaccessible endpoints public.
- Remote execution still needs provider credentials and connectivity.
Explanation
Correct Answer
C:For HCP Terraform agent in the task to execute Terraform with network access to private environments, the important caution is: An agent requires setup and does not make inaccessible endpoints public. The reason this matters is its actual behavior: An HCP Terraform agent can run work in an operator-controlled environment and connect to private resources.
Incorrect Answers
A:The proposed warning belongs to HCP Terraform workspace, which serves the different goal to isolate the state, variables, and run history for one managed infrastructure unit, rather than to HCP Terraform agent: An HCP Terraform workspace organizes a Terraform run context with its own state and configuration connection. The question concerns HCP Terraform agent acting to execute Terraform with network access to private environments, not a limit of HCP Terraform workspace.
B:The proposed warning belongs to VCS-driven HCP Terraform workflow, which serves the different goal to start remote plans from connected version-control updates, rather than to HCP Terraform agent: A VCS-connected workspace can queue runs when matching configuration changes are committed. The question concerns HCP Terraform agent acting to execute Terraform with network access to private environments, not a limit of VCS-driven HCP Terraform workflow.
D:The proposed warning belongs to HCP Terraform remote execution, which serves the different goal to execute Terraform operations in a managed remote runtime, rather than to HCP Terraform agent: HCP Terraform can run plans and applies outside a developer's workstation under workspace controls. The question concerns HCP Terraform agent acting to execute Terraform with network access to private environments, not a limit of HCP Terraform remote execution.
Question 198
A colleague recommends the Terraform concept "Import under aliased provider". Which use case best matches it?
- adopt an existing object rather than creating a new duplicate
- bring a pre-existing remote object under a resource address in Terraform state
- run a plan after importing an object to check unexpected updates
- adopt a remote object from the correct account or region
- use import planning support to help write resource HCL for an existing object
Explanation
Correct Answer
D:The practical result of Import under aliased provider, used to adopt a remote object from the correct account or region, is: The target resource's selected provider configuration determines how Terraform locates and reads the imported object. A qualification for this effect is: The wrong account's credentials may fail even if an ID format looks valid.
Incorrect Answers
A:That outcome applies to Import without recreation, intended to adopt an existing object rather than creating a new duplicate, rather than the question's feature Import under aliased provider: Import connects an existing provider object to the Terraform state mapping. Unlike Import without recreation, Import under aliased provider is intended to adopt a remote object from the correct account or region, not to adopt an existing object rather than creating a new duplicate.
B:That outcome applies to terraform import CLI, intended to bring a pre-existing remote object under a resource address in Terraform state, rather than the question's feature Import under aliased provider: terraform import ADDRESS ID binds the specified remote object to a declared resource instance. Unlike terraform import CLI, Import under aliased provider is intended to adopt a remote object from the correct account or region, not to bring a pre-existing remote object under a resource address in Terraform state.
C:That outcome applies to Import validation follow-up, intended to run a plan after importing an object to check unexpected updates, rather than the question's feature Import under aliased provider: A post-import plan reveals whether declared settings match the newly adopted remote object. Unlike Import validation follow-up, Import under aliased provider is intended to adopt a remote object from the correct account or region, not to run a plan after importing an object to check unexpected updates.
E:That outcome applies to Generate import configuration where supported, intended to use import planning support to help write resource HCL for an existing object, rather than the question's feature Import under aliased provider: Terraform supports generating configuration with appropriate import workflows for certain imported resources. Unlike Generate import configuration where supported, Import under aliased provider is intended to adopt a remote object from the correct account or region, not to use import planning support to help write resource HCL for an existing object.
Question 199
A platform engineering group needs to select the exact indexed instance from count-created resources. Which mechanism most directly meets this particular need?
- Direct attribute reference
- Module output reference
- Implicit resource dependency
- Resource address for count instance
- Self reference in provisioners
Explanation
Correct Answer
D:The task is to select the exact indexed instance from count-created resources; Resource address for count instance directly supports that requirement: Count-created instances use numeric indices in expressions and state addresses, such as example[1]. Its relevant boundary is: The index is not a stable semantic key if list ordering changes.
Incorrect Answers
A:Direct attribute reference is designed to pass the generated ID of one resource into a dependent resource, whereas this task is to select the exact indexed instance from count-created resources: An expression such as aws_vpc.main.id links a consuming argument to an upstream resource attribute. Against Resource address for count instance, its limitation is: Using a plain string ID loses that implicit graph dependency.
B:Module output reference is designed to use a value explicitly exported by a child module, whereas this task is to select the exact indexed instance from count-created resources: The parent reads a child output through module.name.output_name rather than reaching into child internals. Against Resource address for count instance, its limitation is: Unexported child resource attributes are not directly available to the caller.
C:Implicit resource dependency is designed to ensure a dependent resource waits for a referenced upstream attribute, whereas this task is to select the exact indexed instance from count-created resources: Terraform infers dependencies when expressions reference other resources. Against Resource address for count instance, its limitation is: An explicit depends_on is unnecessary for relationships already expressed through references.
E:Self reference in provisioners addresses the different requirement to refer to the current managed object in its own provisioner context: The self object is available in supported provisioner and connection contexts for the containing resource; this does not by itself satisfy the requested task to select the exact indexed instance from count-created resources. For the stated need, Resource address for count instance is the more direct mechanism.
Question 200
A Terraform rollout has two separate requirements: first, review planned deletion before permitting an irreversible action; second, separate proposing infrastructure changes from authorizing them. Which assignment of mechanisms correctly handles both responsibilities?
- First use Collaborative review before apply; then use Plan inspection checkpoint.
- First use Saved plan promotion; then use Collaborative review before apply.
- First use Plan inspection checkpoint; then use Plan refresh and graph evaluation.
- First use Plan refresh and graph evaluation; then use Saved plan promotion.
- First use Plan inspection checkpoint; then use Collaborative review before apply.
Explanation
Correct Answer
E:The first requirement, to review planned deletion before permitting an irreversible action, is handled by Plan inspection checkpoint: A review of change symbols and affected addresses can reveal unexpected destroy or replacement operations. The second requirement, to separate proposing infrastructure changes from authorizing them, is handled by Collaborative review before apply: Teams can share configuration and review a Terraform plan before a privileged apply runs. Each of these mechanisms has a distinct responsibility.
Incorrect Answers
A:For the requested tasks to review planned deletion before permitting an irreversible action and separate proposing infrastructure changes from authorizing them, the first candidate Collaborative review before apply addresses separate proposing infrastructure changes from authorizing them; the second candidate Plan inspection checkpoint addresses review planned deletion before permitting an irreversible action. This mapping fails because the first mechanism primarily supports the task to separate proposing infrastructure changes from authorizing them and the second mechanism primarily supports the task to review planned deletion before permitting an irreversible action; the actual requirements are review planned deletion before permitting an irreversible action first and separate proposing infrastructure changes from authorizing them second.
B:For the requested tasks to review planned deletion before permitting an irreversible action and separate proposing infrastructure changes from authorizing them, the first candidate Saved plan promotion addresses apply the reviewed plan artifact rather than recomputing from changed inputs; the second candidate Collaborative review before apply addresses separate proposing infrastructure changes from authorizing them. This mapping fails because the first mechanism primarily supports the task to apply the reviewed plan artifact rather than recomputing from changed inputs; the actual requirements are review planned deletion before permitting an irreversible action first and separate proposing infrastructure changes from authorizing them second.
C:For the requested tasks to review planned deletion before permitting an irreversible action and separate proposing infrastructure changes from authorizing them, the first candidate Plan inspection checkpoint addresses review planned deletion before permitting an irreversible action; the second candidate Plan refresh and graph evaluation addresses reason about dependencies before Terraform proposes remote operations. This mapping fails because the second mechanism primarily supports the task to reason about dependencies before Terraform proposes remote operations; the actual requirements are review planned deletion before permitting an irreversible action first and separate proposing infrastructure changes from authorizing them second.
D:For the requested tasks to review planned deletion before permitting an irreversible action and separate proposing infrastructure changes from authorizing them, the first candidate Plan refresh and graph evaluation addresses reason about dependencies before Terraform proposes remote operations; the second candidate Saved plan promotion addresses apply the reviewed plan artifact rather than recomputing from changed inputs. This mapping fails because the first mechanism primarily supports the task to reason about dependencies before Terraform proposes remote operations and the second mechanism primarily supports the task to apply the reviewed plan artifact rather than recomputing from changed inputs; the actual requirements are review planned deletion before permitting an irreversible action first and separate proposing infrastructure changes from authorizing them second.