Question 60
A Terraform rollout has two separate requirements: first, identify a pre-existing infrastructure object using provider-supported search criteria; second, distinguish a provider-defined resource kind from its Terraform address label. Which assignment of mechanisms correctly handles both responsibilities?
- First use Data source dependency scheduling; then use Resource type and local name.
- First use Resource type and local name; then use Data source lookup filters.
- First use Data source lookup filters; then use Resource attributes computed by provider.
- First use Data source lookup filters; then use Resource type and local name.
- First use Resource attributes computed by provider; then use Data source dependency scheduling.
Explanation
Correct Answer
D:The first requirement, to identify a pre-existing infrastructure object using provider-supported search criteria, is handled by Data source lookup filters: Data source arguments let the provider identify an existing object, often by name or tags. The second requirement, to distinguish a provider-defined resource kind from its Terraform address label, is handled by Resource type and local name: A resource block has both a resource type and local name, forming references like aws_vpc.main. Each of these mechanisms has a distinct responsibility.
Incorrect Answers
A:For the requested tasks to identify a pre-existing infrastructure object using provider-supported search criteria and distinguish a provider-defined resource kind from its Terraform address label, the first candidate Data source dependency scheduling addresses defer a read when its arguments depend on a resource still being created; the second candidate Resource type and local name addresses distinguish a provider-defined resource kind from its Terraform address label. This mapping fails because the first mechanism primarily supports the task to defer a read when its arguments depend on a resource still being created; the actual requirements are identify a pre-existing infrastructure object using provider-supported search criteria first and distinguish a provider-defined resource kind from its Terraform address label second.
B:For the requested tasks to identify a pre-existing infrastructure object using provider-supported search criteria and distinguish a provider-defined resource kind from its Terraform address label, the first candidate Resource type and local name addresses distinguish a provider-defined resource kind from its Terraform address label; the second candidate Data source lookup filters addresses identify a pre-existing infrastructure object using provider-supported search criteria. This mapping fails because the first mechanism primarily supports the task to distinguish a provider-defined resource kind from its Terraform address label and the second mechanism primarily supports the task to identify a pre-existing infrastructure object using provider-supported search criteria; the actual requirements are identify a pre-existing infrastructure object using provider-supported search criteria first and distinguish a provider-defined resource kind from its Terraform address label second.
C:For the requested tasks to identify a pre-existing infrastructure object using provider-supported search criteria and distinguish a provider-defined resource kind from its Terraform address label, the first candidate Data source lookup filters addresses identify a pre-existing infrastructure object using provider-supported search criteria; the second candidate Resource attributes computed by provider addresses consume an assigned ID only after the provider supplies it. This mapping fails because the second mechanism primarily supports the task to consume an assigned ID only after the provider supplies it; the actual requirements are identify a pre-existing infrastructure object using provider-supported search criteria first and distinguish a provider-defined resource kind from its Terraform address label second.
E:For the requested tasks to identify a pre-existing infrastructure object using provider-supported search criteria and distinguish a provider-defined resource kind from its Terraform address label, the first candidate Resource attributes computed by provider addresses consume an assigned ID only after the provider supplies it; the second candidate Data source dependency scheduling addresses defer a read when its arguments depend on a resource still being created. This mapping fails because the first mechanism primarily supports the task to consume an assigned ID only after the provider supplies it and the second mechanism primarily supports the task to defer a read when its arguments depend on a resource still being created; the actual requirements are identify a pre-existing infrastructure object using provider-supported search criteria first and distinguish a provider-defined resource kind from its Terraform address label second.
Question 61
A deployment design calls for a supported way to reason about dependencies before Terraform proposes remote operations. Which mechanism most directly meets this particular need?
- Saved plan promotion
- Collaborative review before apply
- Configuration change cycle
- Plan refresh and graph evaluation
- Dependency-aware parallelism
Explanation
Correct Answer
D:The task is to reason about dependencies before Terraform proposes remote operations; Plan refresh and graph evaluation directly supports that requirement: Terraform evaluates configuration, state, and provider information to construct an action graph. Its relevant boundary is: The graph is not simply a sequential list ordered by file line number.
Incorrect Answers
A:Saved plan promotion is designed to apply the reviewed plan artifact rather than recomputing from changed inputs, whereas this task is to reason about dependencies before Terraform proposes remote operations: terraform plan -out creates a binary plan that terraform apply can execute by file name. Against Plan refresh and graph evaluation, its limitation is: Saved plans may contain sensitive values and must be protected.
B:Collaborative review before apply is designed to separate proposing infrastructure changes from authorizing them, whereas this task is to reason about dependencies before Terraform proposes remote operations: Teams can share configuration and review a Terraform plan before a privileged apply runs. Against Plan refresh and graph evaluation, its limitation is: Version control approval alone does not guarantee the exact reviewed plan is used.
C:Configuration change cycle is designed to modify desired resource arguments then inspect the resulting plan, whereas this task is to reason about dependencies before Terraform proposes remote operations: Editing HCL changes intended infrastructure and a new plan reveals proposed differences. Against Plan refresh and graph evaluation, its limitation is: Editing a file does not update the cloud before apply.
E:Dependency-aware parallelism addresses the different requirement to allow independent resources to be managed concurrently within one run: Terraform uses its dependency graph to schedule actions that have no ordering relationship; this does not by itself satisfy the requested task to reason about dependencies before Terraform proposes remote operations. For the stated need, Plan refresh and graph evaluation is the more direct mechanism.
Question 62
An engineer must update an existing Terraform workflow to distinguish state of different local Terraform workspaces. Which mechanism most directly meets this particular need?
- Custom local state path
- Default local state storage
- Local workspace state files
- Local backend and shared CI
- Local state access controls
Explanation
Correct Answer
C:The task is to distinguish state of different local Terraform workspaces; Local workspace state files directly supports that requirement: Non-default local workspace state snapshots can be kept in a terraform.tfstate.d structure. Its relevant boundary is: Separate workspace state does not change the configuration code automatically.
Incorrect Answers
A:Custom local state path is designed to place an isolated sandbox state file away from another lab's state, whereas this task is to distinguish state of different local Terraform workspaces: A local backend path can separate state storage from another configuration's snapshot. Against Local workspace state files, its limitation is: State location alone does not separate permissions for remote provider resources.
B:Default local state storage is designed to keep a standalone project's state on its local filesystem, whereas this task is to distinguish state of different local Terraform workspaces: Without a configured remote backend, Terraform ordinarily stores state locally in terraform.tfstate. Against Local workspace state files, its limitation is: A local file does not provide multi-user remote collaboration guarantees.
D: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 distinguish state of different local Terraform workspaces: Local state is best suited to isolated or experimental work rather than competing team runners. Against Local workspace state files, its limitation is: Copying a state file between computers is error-prone and can leak secrets.
E:Local state access controls is designed to prevent unauthorized reading of saved infrastructure metadata, whereas this task is to distinguish state of different local Terraform workspaces: Filesystem permissions and secure workstation handling matter when state stays local. Against Local workspace state files, its limitation is: A local backend cannot by itself provide shared policy controls or central audit.
Question 63
A configuration walkthrough identifies "Declarative infrastructure model". Which task is it principally intended to support?
- specify an end state rather than every API request
- repeat an apply without recreating already matching resources
- describe one managed infrastructure object in a configuration
- represent desired infrastructure in reviewable configuration files
Explanation
Correct Answer
A:The practical result of Declarative infrastructure model, used to specify an end state rather than every API request, is: A declarative model states the desired objects and lets Terraform determine an execution path from configuration and state. A qualification for this effect is: It does not mean Terraform can automatically infer missing provider configuration.
Incorrect Answers
B:That outcome applies to Idempotent reconciliation, intended to repeat an apply without recreating already matching resources, rather than the question's feature Declarative infrastructure model: Terraform compares desired configuration with prior state and refreshed remote information and normally plans no change when they agree. Unlike Idempotent reconciliation, Declarative infrastructure model is intended to specify an end state rather than every API request, not to repeat an apply without recreating already matching resources.
C:That outcome applies to Terraform resource declaration, intended to describe one managed infrastructure object in a configuration, rather than the question's feature Declarative infrastructure model: A resource block represents an object that Terraform will create, update, or destroy through a provider. Unlike Terraform resource declaration, Declarative infrastructure model is intended to specify an end state rather than every API request, not to describe one managed infrastructure object in a configuration.
D:That outcome applies to Infrastructure as code definition, intended to represent desired infrastructure in reviewable configuration files, rather than the question's feature Declarative infrastructure model: Infrastructure as code describes infrastructure through machine-readable files instead of relying only on manual console operations. Unlike Infrastructure as code definition, Declarative infrastructure model is intended to specify an end state rather than every API request, not to represent desired infrastructure in reviewable configuration files.
Question 64
During a Terraform 1.12 implementation, the immediate requirement is to reference a reusable Terraform module from a VCS repository. Which mechanism most directly meets this particular need?
- Pinned Git module ref
- Module discovery in registry
- Git-hosted module source
- Registry module version selection
Explanation
Correct Answer
C:The task is to reference a reusable Terraform module from a VCS repository; Git-hosted module source directly supports that requirement: A git:: URL can fetch a module from a Git repository using supported source syntax. Its relevant boundary is: A Git module is not selected by the registry-only version argument.
Incorrect Answers
A:Pinned Git module ref is designed to use a chosen module branch, tag, or commit from a Git source, whereas this task is to reference a reusable Terraform module from a VCS repository: A Git module source can use ?ref=... to select the intended revision. Against Git-hosted module source, its limitation is: A floating branch can change over time and weaken reproducibility.
B:Module discovery in registry is designed to find documented reusable modules rather than copying configurations manually, whereas this task is to reference a reusable Terraform module from a VCS repository: The Terraform Registry and private module registries can publish modules with inputs and outputs. Against Git-hosted module source, its limitation is: A published module can still depend on provider permissions and external objects.
D:Registry module version selection is designed to choose an explicit compatible release of a registry module, whereas this task is to reference a reusable Terraform module from a VCS repository: The version argument on a registry module call constrains which published module release is installed. Against Git-hosted module source, its limitation is: The version argument is not supported for arbitrary local path modules.
Question 65
For a new infrastructure repository, the team wants to execute Terraform operations in a managed remote runtime. Which mechanism most directly meets this particular need?
- HCP Terraform state storage
- VCS-driven HCP Terraform workflow
- Remote run approval
- HCP Terraform remote execution
Explanation
Correct Answer
D:The task is to execute Terraform operations in a managed remote runtime; HCP Terraform remote execution directly supports that requirement: HCP Terraform can run plans and applies outside a developer's workstation under workspace controls. Its relevant boundary is: Remote execution still needs provider credentials and connectivity.
Incorrect Answers
A:HCP Terraform state storage is designed to store workspace state centrally rather than on a personal machine, whereas this task is to execute Terraform operations in a managed remote runtime: HCP Terraform manages workspace state snapshots with controlled access and history. Against HCP Terraform remote execution, its limitation is: Central state storage does not guarantee infrastructure can be reached from every execution mode.
B:VCS-driven HCP Terraform workflow is designed to start remote plans from connected version-control updates, whereas this task is to execute Terraform operations in a managed remote runtime: A VCS-connected workspace can queue runs when matching configuration changes are committed. Against HCP Terraform remote execution, its limitation is: Its workspace settings determine whether runs need approval or are automatically applied.
C:Remote run approval addresses the different requirement to review a planned change in the HCP Terraform run interface before apply: An HCP workspace can separate planning and apply confirmation for controlled changes; this does not by itself satisfy the requested task to execute Terraform operations in a managed remote runtime. For the stated need, HCP Terraform remote execution is the more direct mechanism.
Question 66
A configuration walkthrough identifies "Configuration-driven import block". Which task is it principally intended to support?
- declare an import target for normal planning and apply
- bring a pre-existing remote object under a resource address in Terraform state
- map a discovered object to the intended Terraform resource instance address
- adopt an existing object rather than creating a new duplicate
Explanation
Correct Answer
A:The practical result of Configuration-driven import block, used to declare an import target for normal planning and apply, is: An import block can specify a resource address and provider-specific identity for import. A qualification for this effect is: The matching managed resource configuration must exist or be generated appropriately.
Incorrect Answers
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 Configuration-driven import block: terraform import ADDRESS ID binds the specified remote object to a declared resource instance. Unlike terraform import CLI, Configuration-driven import block is intended to declare an import target for normal planning and apply, not to bring a pre-existing remote object under a resource address in Terraform state.
C:That outcome applies to Import resource address matching, intended to map a discovered object to the intended Terraform resource instance address, rather than the question's feature Configuration-driven import block: Import uses a Terraform resource address that corresponds to the configuration intended to manage the object. Unlike Import resource address matching, Configuration-driven import block is intended to declare an import target for normal planning and apply, not to map a discovered object to the intended Terraform resource instance address.
D: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 Configuration-driven import block: Import connects an existing provider object to the Terraform state mapping. Unlike Import without recreation, Configuration-driven import block is intended to declare an import target for normal planning and apply, not to adopt an existing object rather than creating a new duplicate.
Question 67
For a new infrastructure repository, the team wants to obtain a shared network identifier owned by a different deployment team. Which mechanism most directly meets this particular need?
- Data source lookup filters
- Managed resource block
- Resource type and local name
- Read-only cross-account lookup
Explanation
Correct Answer
D:The task is to obtain a shared network identifier owned by a different deployment team; Read-only cross-account lookup directly supports that requirement: A data source reads a shared object if the provider configuration has permission to access it. Its relevant boundary is: Reading does not transfer ownership to the consuming root module.
Incorrect Answers
A:Data source lookup filters is designed to identify a pre-existing infrastructure object using provider-supported search criteria, whereas this task is to obtain a shared network identifier owned by a different deployment team: Data source arguments let the provider identify an existing object, often by name or tags. Against Read-only cross-account lookup, its limitation is: A lookup that finds no suitable object can fail rather than creating one.
B:Managed resource block is designed to ask Terraform to create and maintain an infrastructure object, whereas this task is to obtain a shared network identifier owned by a different deployment team: A resource block declares a managed object whose lifecycle Terraform reconciles through a provider. Against Read-only cross-account lookup, its limitation is: It is not a read-only query against an object managed elsewhere.
C:Resource type and local name addresses the different requirement to distinguish a provider-defined resource kind from its Terraform address label: A resource block has both a resource type and local name, forming references like aws_vpc.main; this does not by itself satisfy the requested task to obtain a shared network identifier owned by a different deployment team. For the stated need, Read-only cross-account lookup is the more direct mechanism.
Question 68
During an implementation review, a Terraform team encounters "Plan refresh and graph evaluation". Which purpose is associated with that mechanism?
- separate proposing infrastructure changes from authorizing them
- follow the core workflow from configuration to deliberate execution
- modify desired resource arguments then inspect the resulting plan
- reason about dependencies before Terraform proposes remote operations
Explanation
Correct Answer
D:The practical result of Plan refresh and graph evaluation, used to reason about dependencies before Terraform proposes remote operations, is: Terraform evaluates configuration, state, and provider information to construct an action graph. A qualification for this effect is: The graph is not simply a sequential list ordered by file line number.
Incorrect Answers
A:That outcome applies to Collaborative review before apply, intended to separate proposing infrastructure changes from authorizing them, rather than the question's feature Plan refresh and graph evaluation: Teams can share configuration and review a Terraform plan before a privileged apply runs. Unlike Collaborative review before apply, Plan refresh and graph evaluation is intended to reason about dependencies before Terraform proposes remote operations, not to separate proposing infrastructure changes from authorizing them.
B: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 refresh and graph evaluation: The core workflow involves writing configuration, initializing, planning, then applying intended changes. Unlike Write-plan-apply lifecycle, Plan refresh and graph evaluation is intended to reason about dependencies before Terraform proposes remote operations, not to follow the core workflow from configuration to deliberate execution.
C:The outcome in this option belongs to Configuration change cycle: Editing HCL changes intended infrastructure and a new plan reveals proposed differences; by contrast, the feature actually named in the stem, Plan refresh and graph evaluation, has a distinct purpose: to reason about dependencies before Terraform proposes remote operations.
Question 69
Before adopting Provider version constraint to restrict acceptable versions of an infrastructure provider, which statement sets an accurate boundary?
- It is a permitted range, not proof of the installed provider's actual version.
- It does not apply infrastructure changes during initialization.
- A provider block configures an installed provider instance rather than declaring its source.
- It is not the command that downloads and configures all root-module infrastructure.
- The constraint is not the same as Terraform CLI required_version.
Explanation
Correct Answer
E:For Provider version constraint in the task to restrict acceptable versions of an infrastructure provider, the important caution is: The constraint is not the same as Terraform CLI required_version. The reason this matters is its actual behavior: The version argument in required_providers expresses allowed provider versions, such as a compatible release series.
Incorrect Answers
A:The proposed warning belongs to Provider version compatibility operator, which serves the different goal to allow only nonbreaking versions in a specified range, rather than to Provider version constraint: A constraint like ~> 5.2 permits compatible versions within that bound while excluding the next incompatible major range. The question concerns Provider version constraint acting to restrict acceptable versions of an infrastructure provider, not a limit of Provider version compatibility operator.
B:The proposed warning belongs to Provider installation during init, which serves the different goal to download required plugins into the initialized working environment, rather than to Provider version constraint: terraform init resolves provider dependencies and installs or reuses selected plugin packages. The question concerns Provider version constraint acting to restrict acceptable versions of an infrastructure provider, not a limit of Provider installation during init.
C:The proposed warning belongs to required_providers source, which serves the different goal to identify the namespace and provider plugin that Terraform should install, rather than to Provider version constraint: The required_providers map supplies a provider source address such as hashicorp/aws for dependency resolution. The question concerns Provider version constraint acting to restrict acceptable versions of an infrastructure provider, not a limit of required_providers source.
D:The proposed warning belongs to terraform providers lock, which serves the different goal to populate or update provider checksum selections in the lock file, rather than to Provider version constraint: The providers lock command can record provider package checksums for selected target platforms. The question concerns Provider version constraint acting to restrict acceptable versions of an infrastructure provider, not a limit of terraform providers lock.
Question 70
A colleague recommends the Terraform concept "Local workspace state files". Which use case best matches it?
- distinguish state of different local Terraform workspaces
- avoid using workstation files as the source of truth for team deployments
- prevent unauthorized reading of saved infrastructure metadata
- place an isolated sandbox state file away from another lab's state
Explanation
Correct Answer
A:The practical result of Local workspace state files, used to distinguish state of different local Terraform workspaces, is: Non-default local workspace state snapshots can be kept in a terraform.tfstate.d structure. A qualification for this effect is: Separate workspace state does not change the configuration code automatically.
Incorrect Answers
B: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 Local workspace state files: Local state is best suited to isolated or experimental work rather than competing team runners. Unlike Local backend and shared CI, Local workspace state files is intended to distinguish state of different local Terraform workspaces, not to avoid using workstation files as the source of truth for team deployments.
C:That outcome applies to Local state access controls, intended to prevent unauthorized reading of saved infrastructure metadata, rather than the question's feature Local workspace state files: Filesystem permissions and secure workstation handling matter when state stays local. Unlike Local state access controls, Local workspace state files is intended to distinguish state of different local Terraform workspaces, not to prevent unauthorized reading of saved infrastructure metadata.
D:That outcome applies to Custom local state path, intended to place an isolated sandbox state file away from another lab's state, rather than the question's feature Local workspace state files: A local backend path can separate state storage from another configuration's snapshot. Unlike Custom local state path, Local workspace state files is intended to distinguish state of different local Terraform workspaces, not to place an isolated sandbox state file away from another lab's state.