Question 140
A deployment design calls for a supported way to repeat an apply without recreating already matching resources. Which mechanism most directly meets this particular need?
- Infrastructure as code definition
- Terraform resource declaration
- Idempotent reconciliation
- Desired configuration
Explanation
Correct Answer
C:The task is to repeat an apply without recreating already matching resources; Idempotent reconciliation directly supports that requirement: Terraform compares desired configuration with prior state and refreshed remote information and normally plans no change when they agree. Its relevant boundary is: An external drift or changed input can still cause a nonempty plan.
Incorrect Answers
A:Infrastructure as code definition is designed to represent desired infrastructure in reviewable configuration files, whereas this task is to repeat an apply without recreating already matching resources: Infrastructure as code describes infrastructure through machine-readable files instead of relying only on manual console operations. Against Idempotent reconciliation, its limitation is: The configuration still needs a tool and credentials to change actual systems.
B:Terraform resource declaration is designed to describe one managed infrastructure object in a configuration, whereas this task is to repeat an apply without recreating already matching resources: A resource block represents an object that Terraform will create, update, or destroy through a provider. Against Idempotent reconciliation, its limitation is: A resource declaration is not the same as a read-only data lookup.
D:Desired configuration addresses the different requirement to record intended infrastructure settings under version control: Configuration expresses the operator's intended infrastructure and is the starting point for planning; this does not by itself satisfy the requested task to repeat an apply without recreating already matching resources. For the stated need, Idempotent reconciliation is the more direct mechanism.
Question 141
A Terraform operator is specifically tasked to adopt an existing object rather than creating a new duplicate. Which mechanism most directly meets this particular need?
- Import resource address matching
- Import without recreation
- terraform import CLI
- Import under aliased provider
Explanation
Correct Answer
B:The task is to adopt an existing object rather than creating a new duplicate; Import without recreation directly supports that requirement: Import connects an existing provider object to the Terraform state mapping. Its relevant boundary is: A post-import plan must still be checked for configuration differences.
Incorrect Answers
A:Import resource address matching is designed to map a discovered object to the intended Terraform resource instance address, whereas this task is to adopt an existing object rather than creating a new duplicate: Import uses a Terraform resource address that corresponds to the configuration intended to manage the object. Against Import without recreation, its limitation is: A remote object ID is not interchangeable with the Terraform address.
C:terraform import CLI is designed to bring a pre-existing remote object under a resource address in Terraform state, whereas this task is to adopt an existing object rather than creating a new duplicate: terraform import ADDRESS ID binds the specified remote object to a declared resource instance. Against Import without recreation, its limitation is: The import command alone does not generate a complete root configuration.
D:Import under aliased provider addresses the different requirement 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; this does not by itself satisfy the requested task to adopt an existing object rather than creating a new duplicate. For the stated need, Import without recreation is the more direct mechanism.
Question 142
A Terraform rollout has two separate requirements: first, modify desired resource arguments then inspect the resulting plan; second, review planned deletion before permitting an irreversible action. Which assignment of mechanisms correctly handles both responsibilities?
- First use Configuration change cycle; then use Plan inspection checkpoint.
- First use Write-plan-apply lifecycle; then use Collaborative review before apply.
- First use Configuration change cycle; then use Write-plan-apply lifecycle.
- First use Collaborative review before apply; then use Plan inspection checkpoint.
- First use Plan inspection checkpoint; then use Configuration change cycle.
Explanation
Correct Answer
A:The first requirement, to modify desired resource arguments then inspect the resulting plan, is handled by Configuration change cycle: Editing HCL changes intended infrastructure and a new plan reveals proposed differences. The second 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. Each of these mechanisms has a distinct responsibility.
Incorrect Answers
B:For the requested tasks to modify desired resource arguments then inspect the resulting plan and review planned deletion before permitting an irreversible action, the first candidate Write-plan-apply lifecycle addresses follow the core workflow from configuration to deliberate execution; 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 follow the core workflow from configuration to deliberate execution and the second mechanism primarily supports the task to separate proposing infrastructure changes from authorizing them; the actual requirements are modify desired resource arguments then inspect the resulting plan first and review planned deletion before permitting an irreversible action second.
C:For the requested tasks to modify desired resource arguments then inspect the resulting plan and review planned deletion before permitting an irreversible action, the first candidate Configuration change cycle addresses modify desired resource arguments then inspect the resulting plan; the second candidate Write-plan-apply lifecycle addresses follow the core workflow from configuration to deliberate execution. This mapping fails because the second mechanism primarily supports the task to follow the core workflow from configuration to deliberate execution; the actual requirements are modify desired resource arguments then inspect the resulting plan first and review planned deletion before permitting an irreversible action second.
D:For the requested tasks to modify desired resource arguments then inspect the resulting plan and review planned deletion before permitting an irreversible action, 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; the actual requirements are modify desired resource arguments then inspect the resulting plan first and review planned deletion before permitting an irreversible action second.
E:For the requested tasks to modify desired resource arguments then inspect the resulting plan and review planned deletion before permitting an irreversible action, the first candidate Plan inspection checkpoint addresses review planned deletion before permitting an irreversible action; the second candidate Configuration change cycle addresses modify desired resource arguments then inspect the resulting plan. This mapping fails because the first mechanism primarily supports the task to review planned deletion before permitting an irreversible action and the second mechanism primarily supports the task to modify desired resource arguments then inspect the resulting plan; the actual requirements are modify desired resource arguments then inspect the resulting plan first and review planned deletion before permitting an irreversible action second.
Question 143
A Terraform rollout has two separate requirements: first, prevent unauthorized reading of saved infrastructure metadata; second, place an isolated sandbox state file away from another lab's state. Which assignment of mechanisms correctly handles both responsibilities?
- First use Local state access controls; then use Custom local state path.
- First use Local backend configuration; then use Custom local state path.
- First use Local state access controls; then use Default local state storage.
- First use Default local state storage; then use Local backend configuration.
- First use Custom local state path; then use Local state access controls.
Explanation
Correct Answer
A:The first requirement, to prevent unauthorized reading of saved infrastructure metadata, is handled by Local state access controls: Filesystem permissions and secure workstation handling matter when state stays local. The second requirement, to place an isolated sandbox state file away from another lab's state, is handled by Custom local state path: A local backend path can separate state storage from another configuration's snapshot. Each of these mechanisms has a distinct responsibility.
Incorrect Answers
B:For the requested tasks to prevent unauthorized reading of saved infrastructure metadata and place an isolated sandbox state file away from another lab's state, the first candidate Local backend configuration addresses choose a particular path for a locally stored Terraform state file; the second candidate Custom local state path addresses place an isolated sandbox state file away from another lab's state. This mapping fails because the first mechanism primarily supports the task to choose a particular path for a locally stored Terraform state file; the actual requirements are prevent unauthorized reading of saved infrastructure metadata first and place an isolated sandbox state file away from another lab's state second.
C:For the requested tasks to prevent unauthorized reading of saved infrastructure metadata and place an isolated sandbox state file away from another lab's state, the first candidate Local state access controls addresses prevent unauthorized reading of saved infrastructure metadata; the second candidate Default local state storage addresses keep a standalone project's state on its local filesystem. This mapping fails because the second mechanism primarily supports the task to keep a standalone project's state on its local filesystem; the actual requirements are prevent unauthorized reading of saved infrastructure metadata first and place an isolated sandbox state file away from another lab's state second.
D:For the requested tasks to prevent unauthorized reading of saved infrastructure metadata and place an isolated sandbox state file away from another lab's state, the first candidate Default local state storage addresses keep a standalone project's state on its local filesystem; the second candidate Local backend configuration addresses choose a particular path for a locally stored Terraform state file. This mapping fails because the first mechanism primarily supports the task to keep a standalone project's state on its local filesystem and the second mechanism primarily supports the task to choose a particular path for a locally stored Terraform state file; the actual requirements are prevent unauthorized reading of saved infrastructure metadata first and place an isolated sandbox state file away from another lab's state second.
E:For the requested tasks to prevent unauthorized reading of saved infrastructure metadata and place an isolated sandbox state file away from another lab's state, the first candidate Custom local state path addresses place an isolated sandbox state file away from another lab's state; the second candidate Local state access controls addresses prevent unauthorized reading of saved infrastructure metadata. This mapping fails because the first mechanism primarily supports the task to place an isolated sandbox state file away from another lab's state and the second mechanism primarily supports the task to prevent unauthorized reading of saved infrastructure metadata; the actual requirements are prevent unauthorized reading of saved infrastructure metadata first and place an isolated sandbox state file away from another lab's state second.
Question 144
A design uses Data source dependency scheduling to defer a read when its arguments depend on a resource still being created. Which qualification applies to the named mechanism?
- Reading does not transfer ownership to the consuming root module.
- A data source does not automatically establish ownership over the queried object.
- They should not be hard-coded when proper references are available.
- Changing the local name can change the state address unless migrated.
Explanation
Correct Answer
B:For Data source dependency scheduling in the task to defer a read when its arguments depend on a resource still being created, the important caution is: A data source does not automatically establish ownership over the queried object. The reason this matters is its actual behavior: Terraform tracks references to determine whether a data-source read can run during planning or must wait.
Incorrect Answers
A:The proposed warning belongs to Read-only cross-account lookup, which serves the different goal to obtain a shared network identifier owned by a different deployment team, rather than to Data source dependency scheduling: A data source reads a shared object if the provider configuration has permission to access it. The question concerns Data source dependency scheduling acting to defer a read when its arguments depend on a resource still being created, not a limit of Read-only cross-account lookup.
C:The proposed warning belongs to Resource attributes computed by provider, which serves the different goal to consume an assigned ID only after the provider supplies it, rather than to Data source dependency scheduling: Computed attributes are often unknown during planning and become available after the provider creates or reads an object. The question concerns Data source dependency scheduling acting to defer a read when its arguments depend on a resource still being created, not a limit of Resource attributes computed by provider.
D:The proposed warning belongs to Resource type and local name, which serves the different goal to distinguish a provider-defined resource kind from its Terraform address label, rather than to Data source dependency scheduling: A resource block has both a resource type and local name, forming references like aws_vpc.main. The question concerns Data source dependency scheduling acting to defer a read when its arguments depend on a resource still being created, not a limit of Resource type and local name.
Question 145
A Terraform rollout has two separate requirements: first, use a chosen module branch, tag, or commit from a Git source; second, find documented reusable modules rather than copying configurations manually. Which assignment of mechanisms correctly handles both responsibilities?
- First use Pinned Git module ref; then use Module discovery in registry.
- First use Pinned Git module ref; then use Local child module source.
- First use Module discovery in registry; then use Pinned Git module ref.
- First use Local child module source; then use Public registry module source.
- First use Public registry module source; then use Module discovery in registry.
Explanation
Correct Answer
A:The first requirement, to use a chosen module branch, tag, or commit from a Git source, is handled by Pinned Git module ref: A Git module source can use ?ref=... to select the intended revision. The second requirement, to find documented reusable modules rather than copying configurations manually, is handled by Module discovery in registry: The Terraform Registry and private module registries can publish modules with inputs and outputs. Each of these mechanisms has a distinct responsibility.
Incorrect Answers
B:For the requested tasks to use a chosen module branch, tag, or commit from a Git source and find documented reusable modules rather than copying configurations manually, the first candidate Pinned Git module ref addresses use a chosen module branch, tag, or commit from a Git source; the second candidate Local child module source addresses load a reusable module from a directory in the same repository. This mapping fails because the second mechanism primarily supports the task to load a reusable module from a directory in the same repository; the actual requirements are use a chosen module branch, tag, or commit from a Git source first and find documented reusable modules rather than copying configurations manually second.
C:For the requested tasks to use a chosen module branch, tag, or commit from a Git source and find documented reusable modules rather than copying configurations manually, the first candidate Module discovery in registry addresses find documented reusable modules rather than copying configurations manually; the second candidate Pinned Git module ref addresses use a chosen module branch, tag, or commit from a Git source. This mapping fails because the first mechanism primarily supports the task to find documented reusable modules rather than copying configurations manually and the second mechanism primarily supports the task to use a chosen module branch, tag, or commit from a Git source; the actual requirements are use a chosen module branch, tag, or commit from a Git source first and find documented reusable modules rather than copying configurations manually second.
D:For the requested tasks to use a chosen module branch, tag, or commit from a Git source and find documented reusable modules rather than copying configurations manually, the first candidate Local child module source addresses load a reusable module from a directory in the same repository; the second candidate Public registry module source addresses reuse a published module from the Terraform Registry. This mapping fails because the first mechanism primarily supports the task to load a reusable module from a directory in the same repository and the second mechanism primarily supports the task to reuse a published module from the Terraform Registry; the actual requirements are use a chosen module branch, tag, or commit from a Git source first and find documented reusable modules rather than copying configurations manually second.
E:For the requested tasks to use a chosen module branch, tag, or commit from a Git source and find documented reusable modules rather than copying configurations manually, the first candidate Public registry module source addresses reuse a published module from the Terraform Registry; the second candidate Module discovery in registry addresses find documented reusable modules rather than copying configurations manually. This mapping fails because the first mechanism primarily supports the task to reuse a published module from the Terraform Registry; the actual requirements are use a chosen module branch, tag, or commit from a Git source first and find documented reusable modules rather than copying configurations manually second.
Question 146
A Terraform rollout has two separate requirements: first, review a planned change in the HCP Terraform run interface before apply; second, execute Terraform with network access to private environments. Which assignment of mechanisms correctly handles both responsibilities?
- First use VCS-driven HCP Terraform workflow; then use HCP Terraform agent.
- First use Remote run approval; then use HCP Terraform workspace.
- First use HCP Terraform workspace; then use VCS-driven HCP Terraform workflow.
- First use HCP Terraform agent; then use Remote run approval.
- First use Remote run approval; then use HCP Terraform agent.
Explanation
Correct Answer
E:The first requirement, to review a planned change in the HCP Terraform run interface before apply, is handled by Remote run approval: An HCP workspace can separate planning and apply confirmation for controlled changes. The second requirement, to execute Terraform with network access to private environments, is handled by HCP Terraform agent: An HCP Terraform agent can run work in an operator-controlled environment and connect to private resources. Each of these mechanisms has a distinct responsibility.
Incorrect Answers
A:For the requested tasks to review a planned change in the HCP Terraform run interface before apply and execute Terraform with network access to private environments, the first candidate VCS-driven HCP Terraform workflow addresses start remote plans from connected version-control updates; the second candidate HCP Terraform agent addresses execute Terraform with network access to private environments. This mapping fails because the first mechanism primarily supports the task to start remote plans from connected version-control updates; the actual requirements are review a planned change in the HCP Terraform run interface before apply first and execute Terraform with network access to private environments second.
B:For the requested tasks to review a planned change in the HCP Terraform run interface before apply and execute Terraform with network access to private environments, the first candidate Remote run approval addresses review a planned change in the HCP Terraform run interface before apply; the second candidate HCP Terraform workspace addresses isolate the state, variables, and run history for one managed infrastructure unit. This mapping fails because the second mechanism primarily supports the task to isolate the state, variables, and run history for one managed infrastructure unit; the actual requirements are review a planned change in the HCP Terraform run interface before apply first and execute Terraform with network access to private environments second.
C:For the requested tasks to review a planned change in the HCP Terraform run interface before apply and execute Terraform with network access to private environments, the first candidate HCP Terraform workspace addresses isolate the state, variables, and run history for one managed infrastructure unit; the second candidate VCS-driven HCP Terraform workflow addresses start remote plans from connected version-control updates. This mapping fails because the first mechanism primarily supports the task to isolate the state, variables, and run history for one managed infrastructure unit and the second mechanism primarily supports the task to start remote plans from connected version-control updates; the actual requirements are review a planned change in the HCP Terraform run interface before apply first and execute Terraform with network access to private environments second.
D:For the requested tasks to review a planned change in the HCP Terraform run interface before apply and execute Terraform with network access to private environments, the first candidate HCP Terraform agent addresses execute Terraform with network access to private environments; the second candidate Remote run approval addresses review a planned change in the HCP Terraform run interface before apply. This mapping fails because the first mechanism primarily supports the task to execute Terraform with network access to private environments and the second mechanism primarily supports the task to review a planned change in the HCP Terraform run interface before apply; the actual requirements are review a planned change in the HCP Terraform run interface before apply first and execute Terraform with network access to private environments second.
Question 147
A team reviews the use of terraform init -upgrade in Terraform 1.12. Which purpose matches its actual behavior?
- ask initialization to reconsider allowed provider selections
- allow only nonbreaking versions in a specified range
- populate or update provider checksum selections in the lock file
- download required plugins into the initialized working environment
- identify the namespace and provider plugin that Terraform should install
Explanation
Correct Answer
A:The practical result of terraform init -upgrade, used to ask initialization to reconsider allowed provider selections, is: Using -upgrade during init allows newer versions satisfying the configured provider constraints to be selected. A qualification for this effect is: It cannot override a required_providers constraint that excludes a release.
Incorrect Answers
B:That outcome applies to Provider version compatibility operator, intended to allow only nonbreaking versions in a specified range, rather than the question's feature terraform init -upgrade: A constraint like ~> 5.2 permits compatible versions within that bound while excluding the next incompatible major range. Unlike Provider version compatibility operator, terraform init -upgrade is intended to ask initialization to reconsider allowed provider selections, not to allow only nonbreaking versions in a specified range.
C:That outcome applies to terraform providers lock, intended to populate or update provider checksum selections in the lock file, rather than the question's feature terraform init -upgrade: The providers lock command can record provider package checksums for selected target platforms. Unlike terraform providers lock, terraform init -upgrade is intended to ask initialization to reconsider allowed provider selections, not to populate or update provider checksum selections in the lock file.
D:That outcome applies to Provider installation during init, intended to download required plugins into the initialized working environment, rather than the question's feature terraform init -upgrade: terraform init resolves provider dependencies and installs or reuses selected plugin packages. Unlike Provider installation during init, terraform init -upgrade is intended to ask initialization to reconsider allowed provider selections, not to download required plugins into the initialized working environment.
E: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 init -upgrade: The required_providers map supplies a provider source address such as hashicorp/aws for dependency resolution. Unlike required_providers source, terraform init -upgrade is intended to ask initialization to reconsider allowed provider selections, not to identify the namespace and provider plugin that Terraform should install.
Question 148
The implementation must both defer a read when its arguments depend on a resource still being created and look up an existing object to use its attributes without managing its lifecycle. Which TWO mechanisms directly address these two separate requirements? Choose TWO.
- Read-only cross-account lookup
- Managed resource block
- Data source lookup filters
- Data source dependency scheduling
- Data source block
Explanation
Correct Answers
D:Among the paired tasks to defer a read when its arguments depend on a resource still being created and look up an existing object to use its attributes without managing its lifecycle, Data source dependency scheduling serves the requirement to defer a read when its arguments depend on a resource still being created: Terraform tracks references to determine whether a data-source read can run during planning or must wait. The other task must be covered by a separate mechanism.
E:Among the paired tasks to defer a read when its arguments depend on a resource still being created and look up an existing object to use its attributes without managing its lifecycle, Data source block serves the requirement to look up an existing object to use its attributes without managing its lifecycle: A data block asks its provider to read information; its attributes can feed other expressions. The other task must be covered by a separate mechanism.
Incorrect Answers
A:The requirements are defer a read when its arguments depend on a resource still being created and look up an existing object to use its attributes without managing its lifecycle, while Read-only cross-account lookup supports the different task to obtain a shared network identifier owned by a different deployment team: A data source reads a shared object if the provider configuration has permission to access it. That capability is outside the two selected responsibilities.
B:The requirements are defer a read when its arguments depend on a resource still being created and look up an existing object to use its attributes without managing its lifecycle, while Managed resource block supports the different task to ask Terraform to create and maintain an infrastructure object: A resource block declares a managed object whose lifecycle Terraform reconciles through a provider. That capability is outside the two selected responsibilities.
C:The requirements are defer a read when its arguments depend on a resource still being created and look up an existing object to use its attributes without managing its lifecycle, while Data source lookup filters supports the different task to identify a pre-existing infrastructure object using provider-supported search criteria: Data source arguments let the provider identify an existing object, often by name or tags. That capability is outside the two selected responsibilities.
Question 149
A configuration review identifies the need to allow independent resources to be managed concurrently within one run. Which mechanism most directly meets this particular need?
- Configuration change cycle
- Dependency-aware parallelism
- Plan inspection checkpoint
- Saved plan promotion
Explanation
Correct Answer
B:The task is to allow independent resources to be managed concurrently within one run; Dependency-aware parallelism directly supports that requirement: Terraform uses its dependency graph to schedule actions that have no ordering relationship. Its relevant boundary is: Concurrency still needs backend locking when several runs target the same state.
Incorrect Answers
A:Configuration change cycle is designed to modify desired resource arguments then inspect the resulting plan, whereas this task is to allow independent resources to be managed concurrently within one run: Editing HCL changes intended infrastructure and a new plan reveals proposed differences. Against Dependency-aware parallelism, its limitation is: Editing a file does not update the cloud before apply.
C:Plan inspection checkpoint is designed to review planned deletion before permitting an irreversible action, whereas this task is to allow independent resources to be managed concurrently within one run: A review of change symbols and affected addresses can reveal unexpected destroy or replacement operations. Against Dependency-aware parallelism, its limitation is: A green validation result cannot substitute for plan review.
D:Saved plan promotion is designed to apply the reviewed plan artifact rather than recomputing from changed inputs, whereas this task is to allow independent resources to be managed concurrently within one run: terraform plan -out creates a binary plan that terraform apply can execute by file name. Against Dependency-aware parallelism, its limitation is: Saved plans may contain sensitive values and must be protected.
Question 150
Before continuing an infrastructure rollout, the operator must avoid using workstation files as the source of truth for team deployments. Which mechanism most directly meets this particular need?
- Local workspace state files
- Local backend configuration
- Default local state storage
- Local backend and shared CI
Explanation
Correct Answer
D:The task is to avoid using workstation files as the source of truth for team deployments; Local backend and shared CI directly supports that requirement: Local state is best suited to isolated or experimental work rather than competing team runners. Its relevant boundary is: Copying a state file between computers is error-prone and can leak secrets.
Incorrect Answers
A:Local workspace state files is designed to distinguish state of different local Terraform workspaces, whereas this task is to avoid using workstation files as the source of truth for team deployments: Non-default local workspace state snapshots can be kept in a terraform.tfstate.d structure. Against Local backend and shared CI, its limitation is: Separate workspace state does not change the configuration code automatically.
B:Local backend configuration is designed to choose a particular path for a locally stored Terraform state file, whereas this task is to avoid using workstation files as the source of truth for team deployments: The local backend supports a path setting to change where state is written. Against Local backend and shared CI, its limitation is: A custom local path still resides on the operator's filesystem.
C:Default local state storage is designed to keep a standalone project's state on its local filesystem, whereas this task is to avoid using workstation files as the source of truth for team deployments: Without a configured remote backend, Terraform ordinarily stores state locally in terraform.tfstate. Against Local backend and shared CI, its limitation is: A local file does not provide multi-user remote collaboration guarantees.