HashiCorp Terraform Associate (HashiCorp Certified: Terraform Associate) Practice Test 12

Question 110

The immediate Terraform task is to identify which remote object Terraform currently manages for a resource block. Which method handles that task most directly?

  1. Distinguish a managed object from a data-source read
  2. Treat state as the resource-address-to-object mapping
  3. Understand refresh during planning
  4. Treat state snapshots as recoverable but hazardous

Explanation

Correct Answer

B:

State binds addresses in configuration to provider-specific remote IDs and recorded attributes; without that mapping Terraform cannot reliably correlate every declared block with an existing object; this behavior should be assessed against the concrete need to identify which remote object Terraform currently manages for a resource block. This directly supports the task to identify which remote object Terraform currently manages for a resource block during a configuration change.

Incorrect Answers

A:

Managed resources have lifecycle operations tracked through state; data sources obtain information without taking ownership of the looked-up remote resource; this behavior should be assessed against the concrete need to identify which remote object Terraform currently manages for a resource block. The distinction matters here: using that mechanism to understand what Terraform considers its responsibility to change would still leave the objective to identify which remote object Terraform currently manages for a resource block unmet.

C:

Terraform typically reads managed remote objects to update its knowledge before making a normal plan; the refresh may reveal drift introduced outside Terraform; this behavior should be assessed against the concrete need to identify which remote object Terraform currently manages for a resource block. The stated requirement is to identify which remote object Terraform currently manages for a resource block, not to compare tracked objects against current provider-reported attributes; this alternative addresses a different control or phase.

D:

An invalid or outdated state snapshot can confuse planned operations; recovery needs controlled version handling, not arbitrary deletion of an active backend; this behavior should be assessed against the concrete need to identify which remote object Terraform currently manages for a resource block. That can be useful when the aim is to plan how to protect, back up, and restore state deliberately, but it does not directly deliver the requested ability to identify which remote object Terraform currently manages for a resource block.

Question 111

A developer is troubleshooting plugin selection after a version change. Two independent changes are requested: first, identify the registry namespace and provider type to install; second, restrict which plugin releases are eligible for installation. Which pair of measures fulfills both?

  1. Declare provider source under required_providers + Use terraform init -lockfile=readonly in CI
  2. Declare provider source under required_providers + Set a provider version constraint
  3. Diagnose an incompatible version constraint intersection + Set a provider version constraint
  4. Constrain required_version for Terraform Core + Inspect selected providers with terraform providers

Explanation

Correct Answer

B:

For the first criterion, the source address identifies the plugin distribution; a local short name in HCL is only an alias within that module; terraform must resolve provider requirements during initialization; this behavior should be assessed against the concrete need to identify the registry namespace and provider type to install and restrict which plugin releases are eligible for installation; this directly addresses the need to identify the registry namespace and provider type to install. For the separate second criterion, a constraint such as ~> 5.0 filters available versions by compatibility; it is not a request to install any arbitrarily newer major version; this behavior should be assessed against the concrete need to identify the registry namespace and provider type to install and restrict which plugin releases are eligible for installation; this fulfills the need to restrict which plugin releases are eligible for installation. Together they cover the independent tasks of identify the registry namespace and provider type to install and restrict which plugin releases are eligible for installation without exchanging the responsibilities of these features.

Incorrect Answers

A:

The first measure meets the requirement to identify the registry namespace and provider type to install, but its partner serves a different role: Read-only mode checks the selections already committed and fails if changes are needed; it is useful for strict repeatable pipelines, not for upgrading providers; this behavior should be assessed against the concrete need to identify the registry namespace and provider type to install and restrict which plugin releases are eligible for installation. That second component is designed to prevent dependency initialization from changing the committed lock file, so the still-missing criterion is to restrict which plugin releases are eligible for installation, while the first criterion remains identify the registry namespace and provider type to install.

C:

The second measure does meet the restrict which plugin releases are eligible for installation requirement, but the first is designed for another concern: Terraform must choose a provider version satisfying all relevant module requirements; contradictory ranges cause initialization failure rather than silent dual-version installation of the same source; this behavior should be assessed against the concrete need to identify the registry namespace and provider type to install and restrict which plugin releases are eligible for installation. That first component is designed to recognize why two modules can prevent provider resolution, which does not accomplish the requested task to identify the registry namespace and provider type to install, even though the other measure satisfies restrict which plugin releases are eligible for installation.

D:

The first measure is intended to specify which Terraform CLI versions may interpret this configuration: The top-level Terraform version constraint concerns the CLI executable, not a provider plugin; provider requirements belong in required_providers; this behavior should be assessed against the concrete need to identify the registry namespace and provider type to install and restrict which plugin releases are eligible for installation. The second measure is intended to see the provider requirements for the root and child modules: The command reports the provider dependency tree and can aid source/version troubleshooting; it does not rewrite constraints or upgrade plugin packages; this behavior should be assessed against the concrete need to identify the registry namespace and provider type to install and restrict which plugin releases are eligible for installation. Neither is the directly designated method for the separate goals of identify the registry namespace and provider type to install and restrict which plugin releases are eligible for installation in this review.

Question 112

An engineer is learning what Terraform Core delegates to plugins. A reviewer must determine how to use values learned only after resource creation or refresh. Which action is the appropriate choice?

  1. Read provider-computed attributes
  2. Distinguish Terraform Core from provider plugins
  3. Select a provider using the resource type prefix
  4. Use data sources to query remote APIs

Explanation

Correct Answer

A:

A provider may return IDs or addresses that were unknown during initial planning; terraform can propagate unknown values through references until the apply produces them; this behavior should be assessed against the concrete need to use values learned only after resource creation or refresh. This directly supports the task to use values learned only after resource creation or refresh during a staged rollout.

Incorrect Answers

B:

Core evaluates configuration and plans operations; a provider talks to its specific API to create, read, update, or delete objects; an API authorization error therefore usually needs provider-side credential review; this behavior should be assessed against the concrete need to use values learned only after resource creation or refresh. The distinction matters here: using that mechanism to locate graph, evaluation, state, and orchestration responsibilities would still leave the objective to use values learned only after resource creation or refresh unmet.

C:

A type such as aws_instance typically maps to the default local provider name aws; an explicit provider meta-argument can override that default configuration; this behavior should be assessed against the concrete need to use values learned only after resource creation or refresh. It may support a related workflow, but the question specifically requires the mechanism for use values learned only after resource creation or refresh rather than understand how an unqualified resource chooses its default provider.

D:

A provider data source fetches attributes exposed by the API; it does not by itself put the looked-up object under Terraform's managed-resource lifecycle; this behavior should be assessed against the concrete need to use values learned only after resource creation or refresh. The stated requirement is to use values learned only after resource creation or refresh, not to read information through a provider without declaring ownership of that object; this alternative addresses a different control or phase.

Question 113

A reviewer has to approve a two-part design: avoid confusing multiple plugins with the same type suffix; additionally, diagnose failures when only aliases are configured. Which option pairs the correct mechanisms?

  1. Inherit the default provider configuration into a child module + Understand the implied empty default provider configuration
  2. Pass a providers map in a module call + Declare configuration_aliases in a child module
  3. Use different local provider names for distinct plugin sources + Understand the implied empty default provider configuration
  4. Use different local provider names for distinct plugin sources + Set provider = aws.west on a resource

Explanation

Correct Answer

C:

For the first criterion, the local name maps a provider source to an identifier in a module; two sources require distinct local names even if their human-facing functions overlap; this behavior should be assessed against the concrete need to avoid confusing multiple plugins with the same type suffix and diagnose failures when only aliases are configured; this directly addresses the need to avoid confusing multiple plugins with the same type suffix. For the separate second criterion, if all provider blocks use aliases, resources without an explicit provider may fall back to an implied empty default; required settings then may be missing; this behavior should be assessed against the concrete need to avoid confusing multiple plugins with the same type suffix and diagnose failures when only aliases are configured; this fulfills the need to diagnose failures when only aliases are configured. Together they cover the independent tasks of avoid confusing multiple plugins with the same type suffix and diagnose failures when only aliases are configured without exchanging the responsibilities of these features.

Incorrect Answers

A:

The second measure does meet the diagnose failures when only aliases are configured requirement, but the first is designed for another concern: Child modules generally inherit default provider configurations when not overridden; aliased configurations are not inherited automatically; this behavior should be assessed against the concrete need to avoid confusing multiple plugins with the same type suffix and diagnose failures when only aliases are configured. That first component is designed to use the parent's ordinary provider settings without manual remapping, which does not accomplish the requested task to avoid confusing multiple plugins with the same type suffix, even though the other measure satisfies diagnose failures when only aliases are configured.

B:

The first measure is intended to map a child module's expected provider names to root configurations: Module provider mappings decide which configurations each child resource receives; the entries reference provider instances, not plain strings of region names; this behavior should be assessed against the concrete need to avoid confusing multiple plugins with the same type suffix and diagnose failures when only aliases are configured. The second measure is intended to make additional provider configuration names available to child resources: A reusable module must declare aliases it expects in provider requirements; the caller can then pass those configurations through its module block; this behavior should be assessed against the concrete need to avoid confusing multiple plugins with the same type suffix and diagnose failures when only aliases are configured. Neither is the directly designated method for the separate goals of avoid confusing multiple plugins with the same type suffix and diagnose failures when only aliases are configured in this review.

D:

The first measure meets the requirement to avoid confusing multiple plugins with the same type suffix, but its partner serves a different role: The provider meta-argument is a reference to a configured provider instance; without it, a resource normally selects its type's default provider; this behavior should be assessed against the concrete need to avoid confusing multiple plugins with the same type suffix and diagnose failures when only aliases are configured. That second component is designed to bind an individual resource to a nondefault provider configuration, so the still-missing criterion is to diagnose failures when only aliases are configured, while the first criterion remains avoid confusing multiple plugins with the same type suffix.

Question 114

In an automated release, the requested result is to explain why plans may propose correcting unapproved changes. What should the engineer select?

  1. Use a remote backend for shared state
  2. Understand one state per workspace boundary
  3. Understand refresh during planning
  4. Identify stale state after out-of-band edits

Explanation

Correct Answer

D:

When someone alters a tracked object directly, current cloud attributes can differ from state and configuration; terraform surfaces reconciliation actions during planning; this behavior should be assessed against the concrete need to explain why plans may propose correcting unapproved changes. This directly supports the task to explain why plans may propose correcting unapproved changes during a module implementation.

Incorrect Answers

A:

Remote backends centralize state storage and may offer locking; sharing a state file via Git is not an equivalent concurrency or secret-management solution; this behavior should be assessed against the concrete need to explain why plans may propose correcting unapproved changes. It may support a related workflow, but the question specifically requires the mechanism for explain why plans may propose correcting unapproved changes rather than make one authoritative state accessible to a collaborating team.

B:

Different Terraform states maintain separate bindings and resource addresses; a shared configuration can therefore manage multiple environments if each has isolated state and inputs; this behavior should be assessed against the concrete need to explain why plans may propose correcting unapproved changes. The stated requirement is to explain why plans may propose correcting unapproved changes, not to avoid mixing independent deployments unintentionally; this alternative addresses a different control or phase.

C:

Terraform typically reads managed remote objects to update its knowledge before making a normal plan; the refresh may reveal drift introduced outside Terraform; this behavior should be assessed against the concrete need to explain why plans may propose correcting unapproved changes. That can be useful when the aim is to compare tracked objects against current provider-reported attributes, but it does not directly deliver the requested ability to explain why plans may propose correcting unapproved changes.

Question 115

During a deployment checklist, one task is to recognize why two modules can prevent provider resolution, while another is to avoid repeatedly downloading the same provider binaries on a build host. Select the matching pair of techniques.

  1. Set a provider version constraint + Use TF_PLUGIN_CACHE_DIR for shared package caching
  2. Inspect selected providers with terraform providers + Distinguish provider requirements from provider configurations
  3. Diagnose an incompatible version constraint intersection + Use TF_PLUGIN_CACHE_DIR for shared package caching
  4. Diagnose an incompatible version constraint intersection + Run terraform init to install plugins

Explanation

Correct Answer

C:

For the first criterion, terraform must choose a provider version satisfying all relevant module requirements; contradictory ranges cause initialization failure rather than silent dual-version installation of the same source; this behavior should be assessed against the concrete need to recognize why two modules can prevent provider resolution and avoid repeatedly downloading the same provider binaries on a build host; this directly addresses the need to recognize why two modules can prevent provider resolution. For the separate second criterion, a plugin cache can reduce download work across directories; it does not replace the dependency lock file's selections and package-verification responsibilities; this behavior should be assessed against the concrete need to recognize why two modules can prevent provider resolution and avoid repeatedly downloading the same provider binaries on a build host; this fulfills the need to avoid repeatedly downloading the same provider binaries on a build host. Together they cover the independent tasks of recognize why two modules can prevent provider resolution and avoid repeatedly downloading the same provider binaries on a build host without exchanging the responsibilities of these features.

Incorrect Answers

A:

The second measure does meet the avoid repeatedly downloading the same provider binaries on a build host requirement, but the first is designed for another concern: A constraint such as ~> 5.0 filters available versions by compatibility; it is not a request to install any arbitrarily newer major version; this behavior should be assessed against the concrete need to recognize why two modules can prevent provider resolution and avoid repeatedly downloading the same provider binaries on a build host. That first component is designed to restrict which plugin releases are eligible for installation, which does not accomplish the requested task to recognize why two modules can prevent provider resolution, even though the other measure satisfies avoid repeatedly downloading the same provider binaries on a build host.

B:

The first measure is intended to see the provider requirements for the root and child modules: The command reports the provider dependency tree and can aid source/version troubleshooting; it does not rewrite constraints or upgrade plugin packages; this behavior should be assessed against the concrete need to recognize why two modules can prevent provider resolution and avoid repeatedly downloading the same provider binaries on a build host. The second measure is intended to separate which plugin to install from how it authenticates and connects: required_providers selects a plugin identity and versions; provider blocks hold instance settings such as region, endpoint, or authentication; this behavior should be assessed against the concrete need to recognize why two modules can prevent provider resolution and avoid repeatedly downloading the same provider binaries on a build host. Neither is the directly designated method for the separate goals of recognize why two modules can prevent provider resolution and avoid repeatedly downloading the same provider binaries on a build host in this review.

D:

The first measure meets the requirement to recognize why two modules can prevent provider resolution, but its partner serves a different role: Initialization resolves provider requirements and places plugin packages into the local cache or working data directory. plan assumes required initialization has occurred; this behavior should be assessed against the concrete need to recognize why two modules can prevent provider resolution and avoid repeatedly downloading the same provider binaries on a build host. That second component is designed to download and initialize missing required providers, so the still-missing criterion is to avoid repeatedly downloading the same provider binaries on a build host, while the first criterion remains recognize why two modules can prevent provider resolution.

Question 116

A reviewer has to approve a two-part design: read information through a provider without declaring ownership of that object; additionally, locate graph, evaluation, state, and orchestration responsibilities. Which option pairs the correct mechanisms?

  1. Avoid assuming providers install automatically at apply + Distinguish Terraform Core from provider plugins
  2. Read provider-computed attributes + Recognize provider source addresses
  3. Use data sources to query remote APIs + Review provider documentation for sensitive attributes
  4. Use data sources to query remote APIs + Distinguish Terraform Core from provider plugins

Explanation

Correct Answer

D:

For the first criterion, a provider data source fetches attributes exposed by the API; it does not by itself put the looked-up object under Terraform's managed-resource lifecycle; this behavior should be assessed against the concrete need to read information through a provider without declaring ownership of that object and locate graph, evaluation, state, and orchestration responsibilities; this directly addresses the need to read information through a provider without declaring ownership of that object. For the separate second criterion, core evaluates configuration and plans operations; a provider talks to its specific API to create, read, update, or delete objects; an API authorization error therefore usually needs provider-side credential review; this behavior should be assessed against the concrete need to read information through a provider without declaring ownership of that object and locate graph, evaluation, state, and orchestration responsibilities; this fulfills the need to locate graph, evaluation, state, and orchestration responsibilities. Together they cover the independent tasks of read information through a provider without declaring ownership of that object and locate graph, evaluation, state, and orchestration responsibilities without exchanging the responsibilities of these features.

Incorrect Answers

A:

The second measure does meet the locate graph, evaluation, state, and orchestration responsibilities requirement, but the first is designed for another concern: Terraform initialization installs provider dependencies before normal plan/apply runs; missing plugin setup cannot be solved solely by granting more cloud permissions; this behavior should be assessed against the concrete need to read information through a provider without declaring ownership of that object and locate graph, evaluation, state, and orchestration responsibilities. That first component is designed to ensure dependencies are installed during initialization, which does not accomplish the requested task to read information through a provider without declaring ownership of that object, even though the other measure satisfies locate graph, evaluation, state, and orchestration responsibilities.

B:

The first measure is intended to use values learned only after resource creation or refresh: A provider may return IDs or addresses that were unknown during initial planning; terraform can propagate unknown values through references until the apply produces them; this behavior should be assessed against the concrete need to read information through a provider without declaring ownership of that object and locate graph, evaluation, state, and orchestration responsibilities. The second measure is intended to distinguish a local provider name from its registry namespace: The source includes registry host, namespace, and type when fully qualified; local names let modules refer to that provider without repeating its entire address; this behavior should be assessed against the concrete need to read information through a provider without declaring ownership of that object and locate graph, evaluation, state, and orchestration responsibilities. Neither is the directly designated method for the separate goals of read information through a provider without declaring ownership of that object and locate graph, evaluation, state, and orchestration responsibilities in this review.

C:

The first measure meets the requirement to read information through a provider without declaring ownership of that object, but its partner serves a different role: Providers decide which schema values are stored, sensitive in display, or write-only; hiding a value in output is not equivalent to omitting it from state; this behavior should be assessed against the concrete need to read information through a provider without declaring ownership of that object and locate graph, evaluation, state, and orchestration responsibilities. That second component is designed to avoid assuming ordinary resource arguments hide secrets from state, so the still-missing criterion is to locate graph, evaluation, state, and orchestration responsibilities, while the first criterion remains read information through a provider without declaring ownership of that object.

Question 117

In an automated release, the requested result is to document the plugin source and compatibility constraints inside each module. What should the engineer select?

  1. Map multiple aliases for a cross-region child module
  2. Use different local provider names for distinct plugin sources
  3. Define an aliased provider block
  4. Declare required_providers separately in a child module

Explanation

Correct Answer

D:

Provider configurations may be passed across modules, but source and version requirements are local to each module; explicit requirements prevent incorrect provider-source inference; this behavior should be assessed against the concrete need to document the plugin source and compatibility constraints inside each module. This directly supports the task to document the plugin source and compatibility constraints inside each module during a module implementation.

Incorrect Answers

A:

A child can declare distinct alias names and the caller can bind each one to a separate root configuration; passing a single default is insufficient for a two-context design; this behavior should be assessed against the concrete need to document the plugin source and compatibility constraints inside each module. That can be useful when the aim is to support a module that must address source and destination environments, but it does not directly deliver the requested ability to document the plugin source and compatibility constraints inside each module.

B:

The local name maps a provider source to an identifier in a module; two sources require distinct local names even if their human-facing functions overlap; this behavior should be assessed against the concrete need to document the plugin source and compatibility constraints inside each module. The distinction matters here: using that mechanism to avoid confusing multiple plugins with the same type suffix would still leave the objective to document the plugin source and compatibility constraints inside each module unmet.

C:

An alias identifies an alternate configuration such as another region; it does not register a different plugin source or version by itself; this behavior should be assessed against the concrete need to document the plugin source and compatibility constraints inside each module. It may support a related workflow, but the question specifically requires the mechanism for document the plugin source and compatibility constraints inside each module rather than create a second named configuration of the same provider.

Question 118

An engineer needs to understand what Terraform considers its responsibility to change as part of an automated release. Which option is the best fit?

  1. Distinguish a managed object from a data-source read
  2. Protect state as sensitive material
  3. Identify stale state after out-of-band edits
  4. Understand refresh during planning

Explanation

Correct Answer

A:

Managed resources have lifecycle operations tracked through state; data sources obtain information without taking ownership of the looked-up remote resource; this behavior should be assessed against the concrete need to understand what Terraform considers its responsibility to change. This directly supports the task to understand what Terraform considers its responsibility to change during an infrastructure audit.

Incorrect Answers

B:

State can hold secrets and identifiers even when CLI output masks a sensitive value; encryption and strict backend access control are important; this behavior should be assessed against the concrete need to understand what Terraform considers its responsibility to change. That can be useful when the aim is to prevent unauthorized access to stored resource attributes, but it does not directly deliver the requested ability to understand what Terraform considers its responsibility to change.

C:

When someone alters a tracked object directly, current cloud attributes can differ from state and configuration; terraform surfaces reconciliation actions during planning; this behavior should be assessed against the concrete need to understand what Terraform considers its responsibility to change. The distinction matters here: using that mechanism to explain why plans may propose correcting unapproved changes would still leave the objective to understand what Terraform considers its responsibility to change unmet.

D:

Terraform typically reads managed remote objects to update its knowledge before making a normal plan; the refresh may reveal drift introduced outside Terraform; this behavior should be assessed against the concrete need to understand what Terraform considers its responsibility to change. It may support a related workflow, but the question specifically requires the mechanism for understand what Terraform considers its responsibility to change rather than compare tracked objects against current provider-reported attributes.

Question 119

The immediate Terraform task is to separate which plugin to install from how it authenticates and connects. Which method handles that task most directly?

  1. Distinguish provider requirements from provider configurations
  2. Set a provider version constraint
  3. Constrain required_version for Terraform Core
  4. Declare provider source under required_providers

Explanation

Correct Answer

A:

required_providers selects a plugin identity and versions; provider blocks hold instance settings such as region, endpoint, or authentication; this behavior should be assessed against the concrete need to separate which plugin to install from how it authenticates and connects. This directly supports the task to separate which plugin to install from how it authenticates and connects during a configuration change.

Incorrect Answers

B:

A constraint such as ~> 5.0 filters available versions by compatibility; it is not a request to install any arbitrarily newer major version; this behavior should be assessed against the concrete need to separate which plugin to install from how it authenticates and connects. That can be useful when the aim is to restrict which plugin releases are eligible for installation, but it does not directly deliver the requested ability to separate which plugin to install from how it authenticates and connects.

C:

The top-level Terraform version constraint concerns the CLI executable, not a provider plugin; provider requirements belong in required_providers; this behavior should be assessed against the concrete need to separate which plugin to install from how it authenticates and connects. The distinction matters here: using that mechanism to specify which Terraform CLI versions may interpret this configuration would still leave the objective to separate which plugin to install from how it authenticates and connects unmet.

D:

The source address identifies the plugin distribution; a local short name in HCL is only an alias within that module; terraform must resolve provider requirements during initialization; this behavior should be assessed against the concrete need to separate which plugin to install from how it authenticates and connects. It may support a related workflow, but the question specifically requires the mechanism for separate which plugin to install from how it authenticates and connects rather than identify the registry namespace and provider type to install.

Question 120

A Terraform rollout has separate acceptance criteria: distinguish a local provider name from its registry namespace and avoid assuming ordinary resource arguments hide secrets from state. Which combined approach directly satisfies the two criteria?

  1. Recognize provider source addresses + Recognize a provider as an API plugin
  2. Select a provider using the resource type prefix + Review provider documentation for sensitive attributes
  3. Recognize provider source addresses + Review provider documentation for sensitive attributes
  4. Configure a provider's authentication + Understand a provider plugin's version independence

Explanation

Correct Answer

C:

For the first criterion, the source includes registry host, namespace, and type when fully qualified; local names let modules refer to that provider without repeating its entire address; this behavior should be assessed against the concrete need to distinguish a local provider name from its registry namespace and avoid assuming ordinary resource arguments hide secrets from state; this directly addresses the need to distinguish a local provider name from its registry namespace. For the separate second criterion, providers decide which schema values are stored, sensitive in display, or write-only; hiding a value in output is not equivalent to omitting it from state; this behavior should be assessed against the concrete need to distinguish a local provider name from its registry namespace and avoid assuming ordinary resource arguments hide secrets from state; this fulfills the need to avoid assuming ordinary resource arguments hide secrets from state. Together they cover the independent tasks of distinguish a local provider name from its registry namespace and avoid assuming ordinary resource arguments hide secrets from state without exchanging the responsibilities of these features.

Incorrect Answers

A:

The first measure meets the requirement to distinguish a local provider name from its registry namespace, but its partner serves a different role: Provider binaries translate resource and data-source lifecycle requests into service-specific API calls; terraform Core builds plans and tracks dependencies, rather than implementing every cloud API directly; this behavior should be assessed against the concrete need to distinguish a local provider name from its registry namespace and avoid assuming ordinary resource arguments hide secrets from state. That second component is designed to map Terraform resource operations to a platform's API, so the still-missing criterion is to avoid assuming ordinary resource arguments hide secrets from state, while the first criterion remains distinguish a local provider name from its registry namespace.

B:

The second measure does meet the avoid assuming ordinary resource arguments hide secrets from state requirement, but the first is designed for another concern: A type such as aws_instance typically maps to the default local provider name aws; an explicit provider meta-argument can override that default configuration; this behavior should be assessed against the concrete need to distinguish a local provider name from its registry namespace and avoid assuming ordinary resource arguments hide secrets from state. That first component is designed to understand how an unqualified resource chooses its default provider, which does not accomplish the requested task to distinguish a local provider name from its registry namespace, even though the other measure satisfies avoid assuming ordinary resource arguments hide secrets from state.

D:

The first measure is intended to supply credentials and settings needed for remote API requests: Provider configuration determines how the plugin connects to its service; defining the plugin requirement alone is not sufficient for authenticated resource operations; this behavior should be assessed against the concrete need to distinguish a local provider name from its registry namespace and avoid assuming ordinary resource arguments hide secrets from state. The second measure is intended to separate provider release changes from upgrading Terraform CLI: A provider is distributed and versioned independently of Terraform Core; compatibility constraints may restrict usable combinations; this behavior should be assessed against the concrete need to distinguish a local provider name from its registry namespace and avoid assuming ordinary resource arguments hide secrets from state. Neither is the directly designated method for the separate goals of distinguish a local provider name from its registry namespace and avoid assuming ordinary resource arguments hide secrets from state in this review.

HashiCorp Certified: Terraform Associate (Terraform Associate) Practice Tests