Question 160
A Terraform runbook describes the mechanism "HCP Terraform API-driven run". Which responsibility should a reviewer associate with it?
- start remote plans from connected version-control updates
- review a planned change in the HCP Terraform run interface before apply
- queue runs through an API integration instead of only direct Git events
- store workspace state centrally rather than on a personal machine
- isolate the state, variables, and run history for one managed infrastructure unit
- execute Terraform with network access to private environments
Explanation
Correct Answer
C:The practical result of HCP Terraform API-driven run, used to queue runs through an API integration instead of only direct Git events, is: The HCP Terraform API can support workflows that upload configuration and trigger managed runs. A qualification for this effect is: An API workflow must still authenticate and choose the intended workspace.
Incorrect Answers
A: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 API-driven run: A VCS-connected workspace can queue runs when matching configuration changes are committed. Unlike VCS-driven HCP Terraform workflow, HCP Terraform API-driven run is intended to queue runs through an API integration instead of only direct Git events, not to start remote plans from connected version-control updates.
B:That outcome applies to Remote run approval, intended to review a planned change in the HCP Terraform run interface before apply, rather than the question's feature HCP Terraform API-driven run: An HCP workspace can separate planning and apply confirmation for controlled changes. Unlike Remote run approval, HCP Terraform API-driven run is intended to queue runs through an API integration instead of only direct Git events, not to review a planned change in the HCP Terraform run interface before apply.
D:That outcome applies to HCP Terraform state storage, intended to store workspace state centrally rather than on a personal machine, rather than the question's feature HCP Terraform API-driven run: HCP Terraform manages workspace state snapshots with controlled access and history. Unlike HCP Terraform state storage, HCP Terraform API-driven run is intended to queue runs through an API integration instead of only direct Git events, not to store workspace state centrally rather than on a personal machine.
E: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 API-driven run: An HCP Terraform workspace organizes a Terraform run context with its own state and configuration connection. Unlike HCP Terraform workspace, HCP Terraform API-driven run is intended to queue runs through an API integration instead of only direct Git events, not to isolate the state, variables, and run history for one managed infrastructure unit.
F:That outcome applies to HCP Terraform agent, intended to execute Terraform with network access to private environments, rather than the question's feature HCP Terraform API-driven run: An HCP Terraform agent can run work in an operator-controlled environment and connect to private resources. Unlike HCP Terraform agent, HCP Terraform API-driven run is intended to queue runs through an API integration instead of only direct Git events, not to execute Terraform with network access to private environments.
Question 161
During an implementation review, a Terraform team encounters "Direct attribute reference". Which purpose is associated with that mechanism?
- select the exact indexed instance from count-created resources
- pass the generated ID of one resource into a dependent resource
- refer to an instance selected by its map or set key
- ensure a dependent resource waits for a referenced upstream attribute
Explanation
Correct Answer
B:The practical result of Direct attribute reference, used to pass the generated ID of one resource into a dependent resource, is: An expression such as aws_vpc.main.id links a consuming argument to an upstream resource attribute. A qualification for this effect is: Using a plain string ID loses that implicit graph dependency.
Incorrect Answers
A:That outcome applies to Resource address for count instance, intended to select the exact indexed instance from count-created resources, rather than the question's feature Direct attribute reference: Count-created instances use numeric indices in expressions and state addresses, such as example[1]. Unlike Resource address for count instance, Direct attribute reference is intended to pass the generated ID of one resource into a dependent resource, not to select the exact indexed instance from count-created resources.
C:That outcome applies to Resource address for for_each instance, intended to refer to an instance selected by its map or set key, rather than the question's feature Direct attribute reference: A for_each resource uses keyed addressing such as example["prod"] and exposes a key-specific object. Unlike Resource address for for_each instance, Direct attribute reference is intended to pass the generated ID of one resource into a dependent resource, not to refer to an instance selected by its map or set key.
D:That outcome applies to Implicit resource dependency, intended to ensure a dependent resource waits for a referenced upstream attribute, rather than the question's feature Direct attribute reference: Terraform infers dependencies when expressions reference other resources. Unlike Implicit resource dependency, Direct attribute reference is intended to pass the generated ID of one resource into a dependent resource, not to ensure a dependent resource waits for a referenced upstream attribute.
Question 162
The rollout owner asks whether Idempotent reconciliation is sufficient to repeat an apply without recreating already matching resources. Which limitation specifically concerns that mechanism?
- The configuration still needs a tool and credentials to change actual systems.
- A resource declaration is not the same as a read-only data lookup.
- The file alone does not reveal every live change made outside Terraform.
- An external drift or changed input can still cause a nonempty plan.
Explanation
Correct Answer
D:For Idempotent reconciliation in the task to repeat an apply without recreating already matching resources, the important caution is: An external drift or changed input can still cause a nonempty plan. The reason this matters is its actual behavior: Terraform compares desired configuration with prior state and refreshed remote information and normally plans no change when they agree.
Incorrect Answers
A:The proposed warning belongs to Infrastructure as code definition, which serves the different goal to represent desired infrastructure in reviewable configuration files, rather than to Idempotent reconciliation: Infrastructure as code describes infrastructure through machine-readable files instead of relying only on manual console operations. The question concerns Idempotent reconciliation acting to repeat an apply without recreating already matching resources, not a limit of Infrastructure as code definition.
B:The proposed warning belongs to Terraform resource declaration, which serves the different goal to describe one managed infrastructure object in a configuration, rather than to Idempotent reconciliation: A resource block represents an object that Terraform will create, update, or destroy through a provider. The question concerns Idempotent reconciliation acting to repeat an apply without recreating already matching resources, not a limit of Terraform resource declaration.
C:The listed caution belongs specifically to Desired configuration, used to record intended infrastructure settings under version control: Configuration expresses the operator's intended infrastructure and is the starting point for planning; the feature under review is instead Idempotent reconciliation, so this answer attaches another feature's qualification to the wrong mechanism.
Question 163
The rollout owner asks whether Import without recreation is sufficient to adopt an existing object rather than creating a new duplicate. Which limitation specifically concerns that mechanism?
- A remote object ID is not interchangeable with the Terraform address.
- A post-import plan must still be checked for configuration differences.
- The import command alone does not generate a complete root configuration.
- The wrong account's credentials may fail even if an ID format looks valid.
Explanation
Correct Answer
B:For Import without recreation in the task to adopt an existing object rather than creating a new duplicate, the important caution is: A post-import plan must still be checked for configuration differences. The reason this matters is its actual behavior: Import connects an existing provider object to the Terraform state mapping.
Incorrect Answers
A:The proposed warning belongs to Import resource address matching, which serves the different goal to map a discovered object to the intended Terraform resource instance address, rather than to Import without recreation: Import uses a Terraform resource address that corresponds to the configuration intended to manage the object. The question concerns Import without recreation acting to adopt an existing object rather than creating a new duplicate, not a limit of Import resource address matching.
C:The proposed warning belongs to terraform import CLI, which serves the different goal to bring a pre-existing remote object under a resource address in Terraform state, rather than to Import without recreation: terraform import ADDRESS ID binds the specified remote object to a declared resource instance. The question concerns Import without recreation acting to adopt an existing object rather than creating a new duplicate, not a limit of terraform import CLI.
D:The listed caution belongs specifically to Import under aliased provider, used to adopt a remote object from the correct account or region: The target resource's selected provider configuration determines how Terraform locates and reads the imported object; the feature under review is instead Import without recreation, so this answer attaches another feature's qualification to the wrong mechanism.
Question 164
A design uses Dependency-aware parallelism to allow independent resources to be managed concurrently within one run. Which qualification applies to the named mechanism?
- Concurrency still needs backend locking when several runs target the same state.
- A green validation result cannot substitute for plan review.
- Editing a file does not update the cloud before apply.
- Destroy and import are maintenance actions rather than steps in every routine run.
Explanation
Correct Answer
A:For Dependency-aware parallelism in the task to allow independent resources to be managed concurrently within one run, the important caution is: Concurrency still needs backend locking when several runs target the same state. The reason this matters is its actual behavior: Terraform uses its dependency graph to schedule actions that have no ordering relationship.
Incorrect Answers
B:The proposed warning belongs to Plan inspection checkpoint, which serves the different goal to review planned deletion before permitting an irreversible action, rather than to Dependency-aware parallelism: A review of change symbols and affected addresses can reveal unexpected destroy or replacement operations. The question concerns Dependency-aware parallelism acting to allow independent resources to be managed concurrently within one run, not a limit of Plan inspection checkpoint.
C:The proposed warning belongs to Configuration change cycle, which serves the different goal to modify desired resource arguments then inspect the resulting plan, rather than to Dependency-aware parallelism: Editing HCL changes intended infrastructure and a new plan reveals proposed differences. The question concerns Dependency-aware parallelism acting to allow independent resources to be managed concurrently within one run, not a limit of Configuration change cycle.
D:The listed caution belongs specifically to Write-plan-apply lifecycle, used to follow the core workflow from configuration to deliberate execution: The core workflow involves writing configuration, initializing, planning, then applying intended changes; the feature under review is instead Dependency-aware parallelism, so this answer attaches another feature's qualification to the wrong mechanism.
Question 165
Before adopting Local backend and shared CI to avoid using workstation files as the source of truth for team deployments, which statement sets an accurate boundary?
- Separate workspace state does not change the configuration code automatically.
- A local file does not provide multi-user remote collaboration guarantees.
- A custom local path still resides on the operator's filesystem.
- Copying a state file between computers is error-prone and can leak secrets.
Explanation
Correct Answer
D:For Local backend and shared CI in the task to avoid using workstation files as the source of truth for team deployments, the important caution is: Copying a state file between computers is error-prone and can leak secrets. The reason this matters is its actual behavior: Local state is best suited to isolated or experimental work rather than competing team runners.
Incorrect Answers
A:The proposed warning belongs to Local workspace state files, which serves the different goal to distinguish state of different local Terraform workspaces, rather than to Local backend and shared CI: Non-default local workspace state snapshots can be kept in a terraform.tfstate.d structure. The question concerns Local backend and shared CI acting to avoid using workstation files as the source of truth for team deployments, not a limit of Local workspace state files.
B:The proposed warning belongs to Default local state storage, which serves the different goal to keep a standalone project's state on its local filesystem, rather than to Local backend and shared CI: Without a configured remote backend, Terraform ordinarily stores state locally in terraform.tfstate. The question concerns Local backend and shared CI acting to avoid using workstation files as the source of truth for team deployments, not a limit of Default local state storage.
C:The proposed warning belongs to Local backend configuration, which serves the different goal to choose a particular path for a locally stored Terraform state file, rather than to Local backend and shared CI: The local backend supports a path setting to change where state is written. The question concerns Local backend and shared CI acting to avoid using workstation files as the source of truth for team deployments, not a limit of Local backend configuration.
Question 166
A change proposal relies on Direct attribute reference for the task to pass the generated ID of one resource into a dependent resource. Which limitation specifically applies to it?
- Using a plain string ID loses that implicit graph dependency.
- A numeric count index is not interchangeable with a for_each string key.
- An explicit depends_on is unnecessary for relationships already expressed through references.
- The index is not a stable semantic key if list ordering changes.
Explanation
Correct Answer
A:For Direct attribute reference in the task to pass the generated ID of one resource into a dependent resource, the important caution is: Using a plain string ID loses that implicit graph dependency. The reason this matters is its actual behavior: An expression such as aws_vpc.main.id links a consuming argument to an upstream resource attribute.
Incorrect Answers
B:The proposed warning belongs to Resource address for for_each instance, which serves the different goal to refer to an instance selected by its map or set key, rather than to Direct attribute reference: A for_each resource uses keyed addressing such as example["prod"] and exposes a key-specific object. The question concerns Direct attribute reference acting to pass the generated ID of one resource into a dependent resource, not a limit of Resource address for for_each instance.
C:The proposed warning belongs to Implicit resource dependency, which serves the different goal to ensure a dependent resource waits for a referenced upstream attribute, rather than to Direct attribute reference: Terraform infers dependencies when expressions reference other resources. The question concerns Direct attribute reference acting to pass the generated ID of one resource into a dependent resource, not a limit of Implicit resource dependency.
D:The proposed warning belongs to Resource address for count instance, which serves the different goal to select the exact indexed instance from count-created resources, rather than to Direct attribute reference: Count-created instances use numeric indices in expressions and state addresses, such as example[1]. The question concerns Direct attribute reference acting to pass the generated ID of one resource into a dependent resource, not a limit of Resource address for count instance.
Question 167
A design uses Registry module version selection to choose an explicit compatible release of a registry module. Which qualification applies to the named mechanism?
- Review source quality and pin an appropriate version instead of assuming every module is vetted.
- The version argument is not supported for arbitrary local path modules.
- A Git module is not selected by the registry-only version argument.
- Local module paths do not use registry module version arguments.
Explanation
Correct Answer
B:For Registry module version selection in the task to choose an explicit compatible release of a registry module, the important caution is: The version argument is not supported for arbitrary local path modules. The reason this matters is its actual behavior: The version argument on a registry module call constrains which published module release is installed.
Incorrect Answers
A:The proposed warning belongs to Public registry module source, which serves the different goal to reuse a published module from the Terraform Registry, rather than to Registry module version selection: Registry source addresses identify published module packages by namespace, name, and provider. The question concerns Registry module version selection acting to choose an explicit compatible release of a registry module, not a limit of Public registry module source.
C:The proposed warning belongs to Git-hosted module source, which serves the different goal to reference a reusable Terraform module from a VCS repository, rather than to Registry module version selection: A git:: URL can fetch a module from a Git repository using supported source syntax. The question concerns Registry module version selection acting to choose an explicit compatible release of a registry module, not a limit of Git-hosted module source.
D:The proposed warning belongs to Local child module source, which serves the different goal to load a reusable module from a directory in the same repository, rather than to Registry module version selection: A source like ./modules/network points a module call at a local filesystem path. The question concerns Registry module version selection acting to choose an explicit compatible release of a registry module, not a limit of Local child module source.
Question 168
The team is documenting risks of HCP Terraform API-driven run while planning to queue runs through an API integration instead of only direct Git events. Which caveat specifically applies to that mechanism?
- An agent requires setup and does not make inaccessible endpoints public.
- A speculative plan from a pull request is not the same as an authorized apply run.
- An API workflow must still authenticate and choose the intended workspace.
- It is not identical to a local CLI workspace's implementation.
Explanation
Correct Answer
C:For HCP Terraform API-driven run in the task to queue runs through an API integration instead of only direct Git events, the important caution is: An API workflow must still authenticate and choose the intended workspace. The reason this matters is its actual behavior: The HCP Terraform API can support workflows that upload configuration and trigger managed runs.
Incorrect Answers
A:The proposed warning belongs to HCP Terraform agent, which serves the different goal to execute Terraform with network access to private environments, rather than to HCP Terraform API-driven run: An HCP Terraform agent can run work in an operator-controlled environment and connect to private resources. The question concerns HCP Terraform API-driven run acting to queue runs through an API integration instead of only direct Git events, not a limit of HCP Terraform agent.
B:The proposed warning belongs to Remote run approval, which serves the different goal to review a planned change in the HCP Terraform run interface before apply, rather than to HCP Terraform API-driven run: An HCP workspace can separate planning and apply confirmation for controlled changes. The question concerns HCP Terraform API-driven run acting to queue runs through an API integration instead of only direct Git events, not a limit of Remote run approval.
D:The listed caution belongs specifically to HCP Terraform workspace, used to isolate the state, variables, and run history for one managed infrastructure unit: An HCP Terraform workspace organizes a Terraform run context with its own state and configuration connection; the feature under review is instead HCP Terraform API-driven run, so this answer attaches another feature's qualification to the wrong mechanism.
Question 169
The implementation must both ask initialization to reconsider allowed provider selections and download required plugins into the initialized working environment. Which TWO mechanisms directly address these two separate requirements? Choose TWO.
- required_providers source
- Provider version constraint
- terraform init -upgrade
- Terraform dependency lock file
- Provider installation during init
Explanation
Correct Answers
C:Among the paired tasks to ask initialization to reconsider allowed provider selections and download required plugins into the initialized working environment, terraform init -upgrade serves the requirement to ask initialization to reconsider allowed provider selections: Using -upgrade during init allows newer versions satisfying the configured provider constraints to be selected. The other task must be covered by a separate mechanism.
E:Among the paired tasks to ask initialization to reconsider allowed provider selections and download required plugins into the initialized working environment, Provider installation during init serves the requirement to download required plugins into the initialized working environment: terraform init resolves provider dependencies and installs or reuses selected plugin packages. The other task must be covered by a separate mechanism.
Incorrect Answers
A:The requirements are ask initialization to reconsider allowed provider selections and download required plugins into the initialized working environment, while required_providers source supports the different task to identify the namespace and provider plugin that Terraform should install: The required_providers map supplies a provider source address such as hashicorp/aws for dependency resolution. That capability is outside the two selected responsibilities.
B:The requirements are ask initialization to reconsider allowed provider selections and download required plugins into the initialized working environment, while Provider version constraint supports the different task to restrict acceptable versions of an infrastructure provider: The version argument in required_providers expresses allowed provider versions, such as a compatible release series. That capability is outside the two selected responsibilities.
D:The requirements are ask initialization to reconsider allowed provider selections and download required plugins into the initialized working environment, while Terraform dependency lock file supports the different task to keep selected provider versions reproducible between runs: The .terraform.lock.hcl file records resolved provider versions and checksums for repeatable installation. That capability is outside the two selected responsibilities.
Question 170
A Terraform rollout has two separate requirements: first, pass the generated ID of one resource into a dependent resource; second, select the exact indexed instance from count-created resources. Which assignment of mechanisms correctly handles both responsibilities?
- First use Module output reference; then use Resource address for count instance.
- First use Resource address for count instance; then use Direct attribute reference.
- First use Resource address for for_each instance; then use Module output reference.
- First use Direct attribute reference; then use Resource address for count instance.
- First use Direct attribute reference; then use Resource address for for_each instance.
Explanation
Correct Answer
D:The first requirement, to pass the generated ID of one resource into a dependent resource, is handled by Direct attribute reference: An expression such as aws_vpc.main.id links a consuming argument to an upstream resource attribute. The second requirement, to select the exact indexed instance from count-created resources, is handled by Resource address for count instance: Count-created instances use numeric indices in expressions and state addresses, such as example[1]. Each of these mechanisms has a distinct responsibility.
Incorrect Answers
A:For the requested tasks to pass the generated ID of one resource into a dependent resource and select the exact indexed instance from count-created resources, the first candidate Module output reference addresses use a value explicitly exported by a child module; the second candidate Resource address for count instance addresses select the exact indexed instance from count-created resources. This mapping fails because the first mechanism primarily supports the task to use a value explicitly exported by a child module; the actual requirements are pass the generated ID of one resource into a dependent resource first and select the exact indexed instance from count-created resources second.
B:For the requested tasks to pass the generated ID of one resource into a dependent resource and select the exact indexed instance from count-created resources, the first candidate Resource address for count instance addresses select the exact indexed instance from count-created resources; the second candidate Direct attribute reference addresses pass the generated ID of one resource into a dependent resource. This mapping fails because the first mechanism primarily supports the task to select the exact indexed instance from count-created resources and the second mechanism primarily supports the task to pass the generated ID of one resource into a dependent resource; the actual requirements are pass the generated ID of one resource into a dependent resource first and select the exact indexed instance from count-created resources second.
C:For the requested tasks to pass the generated ID of one resource into a dependent resource and select the exact indexed instance from count-created resources, the first candidate Resource address for for_each instance addresses refer to an instance selected by its map or set key; the second candidate Module output reference addresses use a value explicitly exported by a child module. 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 use a value explicitly exported by a child module; the actual requirements are pass the generated ID of one resource into a dependent resource first and select the exact indexed instance from count-created resources second.
E:For the requested tasks to pass the generated ID of one resource into a dependent resource and select the exact indexed instance from count-created resources, the first candidate Direct attribute reference addresses pass the generated ID of one resource into a dependent resource; 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 second mechanism primarily supports the task to refer to an instance selected by its map or set key; the actual requirements are pass the generated ID of one resource into a dependent resource first and select the exact indexed instance from count-created resources second.