HashiCorp Terraform Associate 004 (HashiCorp Certified: Terraform Associate (004)) Practice Test 9

Question 80

The rollout owner asks whether HCP Terraform remote execution is sufficient to execute Terraform operations in a managed remote runtime. Which limitation specifically concerns that mechanism?

  1. Central state storage does not guarantee infrastructure can be reached from every execution mode.
  2. Remote execution still needs provider credentials and connectivity.
  3. It is not identical to a local CLI workspace's implementation.
  4. Its workspace settings determine whether runs need approval or are automatically applied.

Explanation

Correct Answer

B:

For HCP Terraform remote execution in the task to execute Terraform operations in a managed remote runtime, the important caution is: Remote execution still needs provider credentials and connectivity. The reason this matters is its actual behavior: HCP Terraform can run plans and applies outside a developer's workstation under workspace controls.

Incorrect Answers

A:

The proposed warning belongs to HCP Terraform state storage, which serves the different goal to store workspace state centrally rather than on a personal machine, rather than to HCP Terraform remote execution: HCP Terraform manages workspace state snapshots with controlled access and history. The question concerns HCP Terraform remote execution acting to execute Terraform operations in a managed remote runtime, not a limit of HCP Terraform state storage.

C:

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 remote execution: An HCP Terraform workspace organizes a Terraform run context with its own state and configuration connection. The question concerns HCP Terraform remote execution acting to execute Terraform operations in a managed remote runtime, not a limit of HCP Terraform workspace.

D:

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 remote execution: A VCS-connected workspace can queue runs when matching configuration changes are committed. The question concerns HCP Terraform remote execution acting to execute Terraform operations in a managed remote runtime, not a limit of VCS-driven HCP Terraform workflow.

Question 81

A Terraform rollout has two separate requirements: first, restrict acceptable versions of an infrastructure provider; second, ask initialization to reconsider allowed provider selections. Which assignment of mechanisms correctly handles both responsibilities?

  1. First use Provider installation during init; then use terraform init -upgrade.
  2. First use Provider version constraint; then use terraform providers lock.
  3. First use Provider version constraint; then use terraform init -upgrade.
  4. First use terraform providers lock; then use Provider installation during init.
  5. First use terraform init -upgrade; then use Provider version constraint.

Explanation

Correct Answer

C:

The first requirement, to restrict acceptable versions of an infrastructure provider, is handled by Provider version constraint: The version argument in required_providers expresses allowed provider versions, such as a compatible release series. The second requirement, to ask initialization to reconsider allowed provider selections, is handled by terraform init -upgrade: Using -upgrade during init allows newer versions satisfying the configured provider constraints to be selected. Each of these mechanisms has a distinct responsibility.

Incorrect Answers

A:

For the requested tasks to restrict acceptable versions of an infrastructure provider and ask initialization to reconsider allowed provider selections, the first candidate Provider installation during init addresses download required plugins into the initialized working environment; the second candidate terraform init -upgrade addresses ask initialization to reconsider allowed provider selections. This mapping fails because the first mechanism primarily supports the task to download required plugins into the initialized working environment; the actual requirements are restrict acceptable versions of an infrastructure provider first and ask initialization to reconsider allowed provider selections second.

B:

For the requested tasks to restrict acceptable versions of an infrastructure provider and ask initialization to reconsider allowed provider selections, the first candidate Provider version constraint addresses restrict acceptable versions of an infrastructure provider; the second candidate terraform providers lock addresses populate or update provider checksum selections in the lock file. This mapping fails because the second mechanism primarily supports the task to populate or update provider checksum selections in the lock file; the actual requirements are restrict acceptable versions of an infrastructure provider first and ask initialization to reconsider allowed provider selections second.

D:

For the requested tasks to restrict acceptable versions of an infrastructure provider and ask initialization to reconsider allowed provider selections, the first candidate terraform providers lock addresses populate or update provider checksum selections in the lock file; the second candidate Provider installation during init addresses download required plugins into the initialized working environment. This mapping fails because the first mechanism primarily supports the task to populate or update provider checksum selections in the lock file and the second mechanism primarily supports the task to download required plugins into the initialized working environment; the actual requirements are restrict acceptable versions of an infrastructure provider first and ask initialization to reconsider allowed provider selections second.

E:

For the requested tasks to restrict acceptable versions of an infrastructure provider and ask initialization to reconsider allowed provider selections, the first candidate terraform init -upgrade addresses ask initialization to reconsider allowed provider selections; the second candidate Provider version constraint addresses restrict acceptable versions of an infrastructure provider. This mapping fails because the first mechanism primarily supports the task to ask initialization to reconsider allowed provider selections and the second mechanism primarily supports the task to restrict acceptable versions of an infrastructure provider; the actual requirements are restrict acceptable versions of an infrastructure provider first and ask initialization to reconsider allowed provider selections second.

Question 82

A Terraform rollout has two separate requirements: first, obtain a shared network identifier owned by a different deployment team; second, consume an assigned ID only after the provider supplies it. Which assignment of mechanisms correctly handles both responsibilities?

  1. First use Read-only cross-account lookup; then use Data source dependency scheduling.
  2. First use Managed resource block; then use Resource attributes computed by provider.
  3. First use Read-only cross-account lookup; then use Resource attributes computed by provider.
  4. First use Data source dependency scheduling; then use Managed resource block.
  5. First use Resource attributes computed by provider; then use Read-only cross-account lookup.

Explanation

Correct Answer

C:

The first requirement, to obtain a shared network identifier owned by a different deployment team, is handled by Read-only cross-account lookup: A data source reads a shared object if the provider configuration has permission to access it. The second requirement, to consume an assigned ID only after the provider supplies it, is handled by Resource attributes computed by provider: Computed attributes are often unknown during planning and become available after the provider creates or reads an object. Each of these mechanisms has a distinct responsibility.

Incorrect Answers

A:

For the requested tasks to obtain a shared network identifier owned by a different deployment team and consume an assigned ID only after the provider supplies it, the first candidate Read-only cross-account lookup addresses obtain a shared network identifier owned by a different deployment team; 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 second mechanism primarily supports the task to defer a read when its arguments depend on a resource still being created; the actual requirements are obtain a shared network identifier owned by a different deployment team first and consume an assigned ID only after the provider supplies it second.

B:

For the requested tasks to obtain a shared network identifier owned by a different deployment team and consume an assigned ID only after the provider supplies it, the first candidate Managed resource block addresses ask Terraform to create and maintain an infrastructure object; the second candidate Resource attributes computed by provider addresses consume an assigned ID only after the provider supplies it. This mapping fails because the first mechanism primarily supports the task to ask Terraform to create and maintain an infrastructure object; the actual requirements are obtain a shared network identifier owned by a different deployment team first and consume an assigned ID only after the provider supplies it second.

D:

For the requested tasks to obtain a shared network identifier owned by a different deployment team and consume an assigned ID only after the provider supplies it, the first candidate Data source dependency scheduling addresses defer a read when its arguments depend on a resource still being created; the second candidate Managed resource block addresses ask Terraform to create and maintain an infrastructure object. 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 and the second mechanism primarily supports the task to ask Terraform to create and maintain an infrastructure object; the actual requirements are obtain a shared network identifier owned by a different deployment team first and consume an assigned ID only after the provider supplies it second.

E:

For the requested tasks to obtain a shared network identifier owned by a different deployment team and consume an assigned ID only after the provider supplies it, the first candidate Resource attributes computed by provider addresses consume an assigned ID only after the provider supplies it; the second candidate Read-only cross-account lookup addresses obtain a shared network identifier owned by a different deployment team. 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 obtain a shared network identifier owned by a different deployment team; the actual requirements are obtain a shared network identifier owned by a different deployment team first and consume an assigned ID only after the provider supplies it second.

Question 83

A Terraform rollout has two separate requirements: first, reason about dependencies before Terraform proposes remote operations; second, modify desired resource arguments then inspect the resulting plan. Which assignment of mechanisms correctly handles both responsibilities?

  1. First use Configuration change cycle; then use Plan refresh and graph evaluation.
  2. First use Plan inspection checkpoint; then use Configuration change cycle.
  3. First use Plan refresh and graph evaluation; then use Dependency-aware parallelism.
  4. First use Dependency-aware parallelism; then use Plan inspection checkpoint.
  5. First use Plan refresh and graph evaluation; then use Configuration change cycle.

Explanation

Correct Answer

E:

The first requirement, to reason about dependencies before Terraform proposes remote operations, is handled by Plan refresh and graph evaluation: Terraform evaluates configuration, state, and provider information to construct an action graph. The second 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. Each of these mechanisms has a distinct responsibility.

Incorrect Answers

A:

For the requested tasks to reason about dependencies before Terraform proposes remote operations and modify desired resource arguments then inspect the resulting plan, the first candidate Configuration change cycle addresses modify desired resource arguments then inspect the resulting plan; the second candidate Plan refresh and graph evaluation addresses reason about dependencies before Terraform proposes remote operations. This mapping fails because the first mechanism primarily supports the task to modify desired resource arguments then inspect the resulting plan and the second mechanism primarily supports the task to reason about dependencies before Terraform proposes remote operations; the actual requirements are reason about dependencies before Terraform proposes remote operations first and modify desired resource arguments then inspect the resulting plan second.

B:

For the requested tasks to reason about dependencies before Terraform proposes remote operations and modify desired resource arguments then inspect the resulting plan, 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; the actual requirements are reason about dependencies before Terraform proposes remote operations first and modify desired resource arguments then inspect the resulting plan second.

C:

For the requested tasks to reason about dependencies before Terraform proposes remote operations and modify desired resource arguments then inspect the resulting plan, the first candidate Plan refresh and graph evaluation addresses reason about dependencies before Terraform proposes remote operations; the second candidate Dependency-aware parallelism addresses allow independent resources to be managed concurrently within one run. This mapping fails because the second mechanism primarily supports the task to allow independent resources to be managed concurrently within one run; the actual requirements are reason about dependencies before Terraform proposes remote operations first and modify desired resource arguments then inspect the resulting plan second.

D:

For the requested tasks to reason about dependencies before Terraform proposes remote operations and modify desired resource arguments then inspect the resulting plan, the first candidate Dependency-aware parallelism addresses allow independent resources to be managed concurrently within one run; 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 allow independent resources to be managed concurrently within one run and the second mechanism primarily supports the task to review planned deletion before permitting an irreversible action; the actual requirements are reason about dependencies before Terraform proposes remote operations first and modify desired resource arguments then inspect the resulting plan second.

Question 84

The implementation must both distinguish state of different local Terraform workspaces and prevent unauthorized reading of saved infrastructure metadata. Which TWO mechanisms directly address these two separate requirements? Choose TWO.

  1. Local state backup
  2. Local workspace state files
  3. Default local state storage
  4. Local state access controls
  5. Local backend and shared CI

Explanation

Correct Answers

B:

Among the paired tasks to distinguish state of different local Terraform workspaces and prevent unauthorized reading of saved infrastructure metadata, Local workspace state files serves the requirement to distinguish state of different local Terraform workspaces: Non-default local workspace state snapshots can be kept in a terraform.tfstate.d structure. The other task must be covered by a separate mechanism.

D:

Among the paired tasks to distinguish state of different local Terraform workspaces and prevent unauthorized reading of saved infrastructure metadata, Local state access controls serves the requirement to prevent unauthorized reading of saved infrastructure metadata: Filesystem permissions and secure workstation handling matter when state stays local. The other task must be covered by a separate mechanism.

Incorrect Answers

A:

The requirements are distinguish state of different local Terraform workspaces and prevent unauthorized reading of saved infrastructure metadata, while Local state backup supports the different task to retain a prior state snapshot while modifying local state: Local state operations commonly create backup snapshots to aid recovery from mistakes. That capability is outside the two selected responsibilities.

C:

The requirements are distinguish state of different local Terraform workspaces and prevent unauthorized reading of saved infrastructure metadata, while Default local state storage supports the different task to keep a standalone project's state on its local filesystem: Without a configured remote backend, Terraform ordinarily stores state locally in terraform.tfstate. That capability is outside the two selected responsibilities.

E:

The requested tasks are to distinguish state of different local Terraform workspaces; prevent unauthorized reading of saved infrastructure metadata, but Local backend and shared CI primarily addresses the different goal to avoid using workstation files as the source of truth for team deployments: Local state is best suited to isolated or experimental work rather than competing team runners; therefore it is not one of the mechanisms selected for the stated requirements.

Question 85

A Terraform rollout has two separate requirements: first, specify an end state rather than every API request; second, repeat an apply without recreating already matching resources. Which assignment of mechanisms correctly handles both responsibilities?

  1. First use Infrastructure execution plan; then use Idempotent reconciliation.
  2. First use Declarative infrastructure model; then use Desired configuration.
  3. First use Declarative infrastructure model; then use Idempotent reconciliation.
  4. First use Idempotent reconciliation; then use Declarative infrastructure model.
  5. First use Desired configuration; then use Infrastructure execution plan.

Explanation

Correct Answer

C:

The first requirement, to specify an end state rather than every API request, is handled by Declarative infrastructure model: A declarative model states the desired objects and lets Terraform determine an execution path from configuration and state. The second requirement, to repeat an apply without recreating already matching resources, is handled by Idempotent reconciliation: Terraform compares desired configuration with prior state and refreshed remote information and normally plans no change when they agree. Each of these mechanisms has a distinct responsibility.

Incorrect Answers

A:

For the requested tasks to specify an end state rather than every API request and repeat an apply without recreating already matching resources, the first candidate Infrastructure execution plan addresses preview the proposed actions before changing real resources; the second candidate Idempotent reconciliation addresses repeat an apply without recreating already matching resources. This mapping fails because the first mechanism primarily supports the task to preview the proposed actions before changing real resources; the actual requirements are specify an end state rather than every API request first and repeat an apply without recreating already matching resources second.

B:

For the requested tasks to specify an end state rather than every API request and repeat an apply without recreating already matching resources, the first candidate Declarative infrastructure model addresses specify an end state rather than every API request; the second candidate Desired configuration addresses record intended infrastructure settings under version control. This mapping fails because the second mechanism primarily supports the task to record intended infrastructure settings under version control; the actual requirements are specify an end state rather than every API request first and repeat an apply without recreating already matching resources second.

D:

For the requested tasks to specify an end state rather than every API request and repeat an apply without recreating already matching resources, the first candidate Idempotent reconciliation addresses repeat an apply without recreating already matching resources; the second candidate Declarative infrastructure model addresses specify an end state rather than every API request. This mapping fails because the first mechanism primarily supports the task to repeat an apply without recreating already matching resources and the second mechanism primarily supports the task to specify an end state rather than every API request; the actual requirements are specify an end state rather than every API request first and repeat an apply without recreating already matching resources second.

E:

For the requested tasks to specify an end state rather than every API request and repeat an apply without recreating already matching resources, the first candidate Desired configuration addresses record intended infrastructure settings under version control; the second candidate Infrastructure execution plan addresses preview the proposed actions before changing real resources. This mapping fails because the first mechanism primarily supports the task to record intended infrastructure settings under version control and the second mechanism primarily supports the task to preview the proposed actions before changing real resources; the actual requirements are specify an end state rather than every API request first and repeat an apply without recreating already matching resources second.

Question 86

A Terraform rollout has two separate requirements: first, reference a reusable Terraform module from a VCS repository; second, use a chosen module branch, tag, or commit from a Git source. Which assignment of mechanisms correctly handles both responsibilities?

  1. First use Registry module version selection; then use Module discovery in registry.
  2. First use Git-hosted module source; then use Pinned Git module ref.
  3. First use Module discovery in registry; then use Pinned Git module ref.
  4. First use Pinned Git module ref; then use Git-hosted module source.
  5. First use Git-hosted module source; then use Registry module version selection.

Explanation

Correct Answer

B:

The first requirement, to reference a reusable Terraform module from a VCS repository, is handled by Git-hosted module source: A git:: URL can fetch a module from a Git repository using supported source syntax. The second 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. Each of these mechanisms has a distinct responsibility.

Incorrect Answers

A:

For the requested tasks to reference a reusable Terraform module from a VCS repository and use a chosen module branch, tag, or commit from a Git source, the first candidate Registry module version selection addresses choose an explicit compatible release of a registry module; 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 choose an explicit compatible release of a registry module and the second mechanism primarily supports the task to find documented reusable modules rather than copying configurations manually; the actual requirements are reference a reusable Terraform module from a VCS repository first and use a chosen module branch, tag, or commit from a Git source second.

C:

For the requested tasks to reference a reusable Terraform module from a VCS repository and use a chosen module branch, tag, or commit from a Git source, 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; the actual requirements are reference a reusable Terraform module from a VCS repository first and use a chosen module branch, tag, or commit from a Git source second.

D:

For the requested tasks to reference a reusable Terraform module from a VCS repository and use a chosen module branch, tag, or commit from a Git source, the first candidate Pinned Git module ref addresses use a chosen module branch, tag, or commit from a Git source; the second candidate Git-hosted module source addresses reference a reusable Terraform module from a VCS repository. This mapping fails because the first mechanism primarily supports the task to use a chosen module branch, tag, or commit from a Git source and the second mechanism primarily supports the task to reference a reusable Terraform module from a VCS repository; the actual requirements are reference a reusable Terraform module from a VCS repository first and use a chosen module branch, tag, or commit from a Git source second.

E:

For the requested tasks to reference a reusable Terraform module from a VCS repository and use a chosen module branch, tag, or commit from a Git source, the first candidate Git-hosted module source addresses reference a reusable Terraform module from a VCS repository; the second candidate Registry module version selection addresses choose an explicit compatible release of a registry module. This mapping fails because the second mechanism primarily supports the task to choose an explicit compatible release of a registry module; the actual requirements are reference a reusable Terraform module from a VCS repository first and use a chosen module branch, tag, or commit from a Git source second.

Question 87

A Terraform rollout has two separate requirements: first, execute Terraform operations in a managed remote runtime; second, review a planned change in the HCP Terraform run interface before apply. Which assignment of mechanisms correctly handles both responsibilities?

  1. First use HCP Terraform agent; then use Remote run approval.
  2. First use HCP Terraform remote execution; then use Remote run approval.
  3. First use Remote run approval; then use HCP Terraform remote execution.
  4. First use HCP Terraform API-driven run; then use HCP Terraform agent.
  5. First use HCP Terraform remote execution; then use HCP Terraform API-driven run.

Explanation

Correct Answer

B:

The first requirement, to execute Terraform operations in a managed remote runtime, is handled by HCP Terraform remote execution: HCP Terraform can run plans and applies outside a developer's workstation under workspace controls. The second 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. Each of these mechanisms has a distinct responsibility.

Incorrect Answers

A:

For the requested tasks to execute Terraform operations in a managed remote runtime and review a planned change in the HCP Terraform run interface before apply, 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; the actual requirements are execute Terraform operations in a managed remote runtime first and review a planned change in the HCP Terraform run interface before apply second.

C:

For the requested tasks to execute Terraform operations in a managed remote runtime and review a planned change in the HCP Terraform run interface before apply, the first candidate Remote run approval addresses review a planned change in the HCP Terraform run interface before apply; the second candidate HCP Terraform remote execution addresses execute Terraform operations in a managed remote runtime. This mapping fails because the first mechanism primarily supports the task to review a planned change in the HCP Terraform run interface before apply and the second mechanism primarily supports the task to execute Terraform operations in a managed remote runtime; the actual requirements are execute Terraform operations in a managed remote runtime first and review a planned change in the HCP Terraform run interface before apply second.

D:

For the requested tasks to execute Terraform operations in a managed remote runtime and review a planned change in the HCP Terraform run interface before apply, the first candidate HCP Terraform API-driven run addresses queue runs through an API integration instead of only direct Git events; 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 queue runs through an API integration instead of only direct Git events and the second mechanism primarily supports the task to execute Terraform with network access to private environments; the actual requirements are execute Terraform operations in a managed remote runtime first and review a planned change in the HCP Terraform run interface before apply second.

E:

For the requested tasks to execute Terraform operations in a managed remote runtime and review a planned change in the HCP Terraform run interface before apply, the first candidate HCP Terraform remote execution addresses execute Terraform operations in a managed remote runtime; the second candidate HCP Terraform API-driven run addresses queue runs through an API integration instead of only direct Git events. This mapping fails because the second mechanism primarily supports the task to queue runs through an API integration instead of only direct Git events; the actual requirements are execute Terraform operations in a managed remote runtime first and review a planned change in the HCP Terraform run interface before apply second.

Question 88

A Terraform rollout has two separate requirements: first, declare an import target for normal planning and apply; second, adopt an existing object rather than creating a new duplicate. Which assignment of mechanisms correctly handles both responsibilities?

  1. First use Configuration-driven import block; then use Import without recreation.
  2. First use Import under aliased provider; then use Generate import configuration where supported.
  3. First use Configuration-driven import block; then use Import under aliased provider.
  4. First use Import without recreation; then use Configuration-driven import block.
  5. First use Generate import configuration where supported; then use Import without recreation.

Explanation

Correct Answer

A:

The first requirement, to declare an import target for normal planning and apply, is handled by Configuration-driven import block: An import block can specify a resource address and provider-specific identity for import. The second requirement, to adopt an existing object rather than creating a new duplicate, is handled by Import without recreation: Import connects an existing provider object to the Terraform state mapping. Each of these mechanisms has a distinct responsibility.

Incorrect Answers

B:

For the requested tasks to declare an import target for normal planning and apply and adopt an existing object rather than creating a new duplicate, the first candidate Import under aliased provider addresses adopt a remote object from the correct account or region; the second candidate Generate import configuration where supported addresses use import planning support to help write resource HCL for an existing object. This mapping fails because the first mechanism primarily supports the task to adopt a remote object from the correct account or region and the second mechanism primarily supports the task to use import planning support to help write resource HCL for an existing object; the actual requirements are declare an import target for normal planning and apply first and adopt an existing object rather than creating a new duplicate second.

C:

For the requested tasks to declare an import target for normal planning and apply and adopt an existing object rather than creating a new duplicate, the first candidate Configuration-driven import block addresses declare an import target for normal planning and apply; the second candidate Import under aliased provider addresses adopt a remote object from the correct account or region. This mapping fails because the second mechanism primarily supports the task to adopt a remote object from the correct account or region; the actual requirements are declare an import target for normal planning and apply first and adopt an existing object rather than creating a new duplicate second.

D:

For the requested tasks to declare an import target for normal planning and apply and adopt an existing object rather than creating a new duplicate, the first candidate Import without recreation addresses adopt an existing object rather than creating a new duplicate; the second candidate Configuration-driven import block addresses declare an import target for normal planning and apply. This mapping fails because the first mechanism primarily supports the task to adopt an existing object rather than creating a new duplicate and the second mechanism primarily supports the task to declare an import target for normal planning and apply; the actual requirements are declare an import target for normal planning and apply first and adopt an existing object rather than creating a new duplicate second.

E:

For the requested tasks to declare an import target for normal planning and apply and adopt an existing object rather than creating a new duplicate, the first candidate Generate import configuration where supported addresses use import planning support to help write resource HCL for an existing object; the second candidate Import without recreation addresses adopt an existing object rather than creating a new duplicate. This mapping fails because the first mechanism primarily supports the task to use import planning support to help write resource HCL for an existing object; the actual requirements are declare an import target for normal planning and apply first and adopt an existing object rather than creating a new duplicate second.

Question 89

A configuration review identifies the need to distinguish a provider-defined resource kind from its Terraform address label. Which mechanism most directly meets this particular need?

  1. Read-only cross-account lookup
  2. Resource attributes computed by provider
  3. Data source dependency scheduling
  4. Resource type and local name

Explanation

Correct Answer

D:

The task is to distinguish a provider-defined resource kind from its Terraform address label; Resource type and local name directly supports that requirement: A resource block has both a resource type and local name, forming references like aws_vpc.main. Its relevant boundary is: Changing the local name can change the state address unless migrated.

Incorrect Answers

A:

Read-only cross-account lookup is designed to obtain a shared network identifier owned by a different deployment team, whereas this task is to distinguish a provider-defined resource kind from its Terraform address label: A data source reads a shared object if the provider configuration has permission to access it. Against Resource type and local name, its limitation is: Reading does not transfer ownership to the consuming root module.

B:

Resource attributes computed by provider is designed to consume an assigned ID only after the provider supplies it, whereas this task is to distinguish a provider-defined resource kind from its Terraform address label: Computed attributes are often unknown during planning and become available after the provider creates or reads an object. Against Resource type and local name, its limitation is: They should not be hard-coded when proper references are available.

C:

Data source dependency scheduling is designed to defer a read when its arguments depend on a resource still being created, whereas this task is to distinguish a provider-defined resource kind from its Terraform address label: Terraform tracks references to determine whether a data-source read can run during planning or must wait. Against Resource type and local name, its limitation is: A data source does not automatically establish ownership over the queried object.

Question 90

An engineer must update an existing Terraform workflow to apply the reviewed plan artifact rather than recomputing from changed inputs. Which mechanism most directly meets this particular need?

  1. Configuration change cycle
  2. Saved plan promotion
  3. Write-plan-apply lifecycle
  4. Dependency-aware parallelism
  5. Plan inspection checkpoint

Explanation

Correct Answer

B:

The task is to apply the reviewed plan artifact rather than recomputing from changed inputs; Saved plan promotion directly supports that requirement: terraform plan -out creates a binary plan that terraform apply can execute by file name. Its relevant boundary is: Saved plans may contain sensitive values and must be protected.

Incorrect Answers

A:

Configuration change cycle is designed to modify desired resource arguments then inspect the resulting plan, whereas this task is to apply the reviewed plan artifact rather than recomputing from changed inputs: Editing HCL changes intended infrastructure and a new plan reveals proposed differences. Against Saved plan promotion, its limitation is: Editing a file does not update the cloud before apply.

C:

Write-plan-apply lifecycle is designed to follow the core workflow from configuration to deliberate execution, whereas this task is to apply the reviewed plan artifact rather than recomputing from changed inputs: The core workflow involves writing configuration, initializing, planning, then applying intended changes. Against Saved plan promotion, its limitation is: Destroy and import are maintenance actions rather than steps in every routine run.

D:

Dependency-aware parallelism is designed to allow independent resources to be managed concurrently within one run, whereas this task is to apply the reviewed plan artifact rather than recomputing from changed inputs: Terraform uses its dependency graph to schedule actions that have no ordering relationship. Against Saved plan promotion, its limitation is: Concurrency still needs backend locking when several runs target the same state.

E:

Plan inspection checkpoint is designed to review planned deletion before permitting an irreversible action, whereas this task is to apply the reviewed plan artifact rather than recomputing from changed inputs: A review of change symbols and affected addresses can reveal unexpected destroy or replacement operations. Against Saved plan promotion, its limitation is: A green validation result cannot substitute for plan review.

HashiCorp Certified: Terraform Associate (004) (Terraform Associate 004) Practice Tests