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

Question 80

A Terraform rollout has separate acceptance criteria: locate graph, evaluation, state, and orchestration responsibilities and avoid assuming one cloud plugin exposes the same resource semantics as another. Which combined approach directly satisfies the two criteria?

  1. Distinguish Terraform Core from provider plugins + Read provider-computed attributes
  2. Recognize a provider as an API plugin + Handle provider-specific constraints
  3. Recognize provider source addresses + Handle provider-specific constraints
  4. Avoid assuming providers install automatically at apply + Understand a provider plugin's version independence
  5. Distinguish Terraform Core from provider plugins + Handle provider-specific constraints

Explanation

Correct Answer

E:

For the first 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 locate graph, evaluation, state, and orchestration responsibilities and avoid assuming one cloud plugin exposes the same resource semantics as another; this directly addresses the need to locate graph, evaluation, state, and orchestration responsibilities. For the separate second criterion, each service API determines supported operations, defaults, quotas, and replacement rules; the shared HCL syntax does not standardize these platform behaviors; this behavior should be assessed against the concrete need to locate graph, evaluation, state, and orchestration responsibilities and avoid assuming one cloud plugin exposes the same resource semantics as another; this fulfills the need to avoid assuming one cloud plugin exposes the same resource semantics as another. Together they cover the independent tasks of locate graph, evaluation, state, and orchestration responsibilities and avoid assuming one cloud plugin exposes the same resource semantics as another without exchanging the responsibilities of these features.

Incorrect Answers

A:

The first measure meets the requirement to locate graph, evaluation, state, and orchestration responsibilities, but its partner serves a different role: 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 locate graph, evaluation, state, and orchestration responsibilities and avoid assuming one cloud plugin exposes the same resource semantics as another. That second component is designed to use values learned only after resource creation or refresh, so the still-missing criterion is to avoid assuming one cloud plugin exposes the same resource semantics as another, while the first criterion remains locate graph, evaluation, state, and orchestration responsibilities.

B:

The second measure does meet the avoid assuming one cloud plugin exposes the same resource semantics as another requirement, but the first is designed for another concern: 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 locate graph, evaluation, state, and orchestration responsibilities and avoid assuming one cloud plugin exposes the same resource semantics as another. That first component is designed to map Terraform resource operations to a platform's API, which does not accomplish the requested task to locate graph, evaluation, state, and orchestration responsibilities, even though the other measure satisfies avoid assuming one cloud plugin exposes the same resource semantics as another.

C:

The second measure does meet the avoid assuming one cloud plugin exposes the same resource semantics as another requirement, but the first is designed for another concern: 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 locate graph, evaluation, state, and orchestration responsibilities and avoid assuming one cloud plugin exposes the same resource semantics as another. That first component is designed to distinguish a local provider name from its registry namespace, which does not accomplish the requested task to locate graph, evaluation, state, and orchestration responsibilities, even though the other measure satisfies avoid assuming one cloud plugin exposes the same resource semantics as another.

D:

The first measure is intended to ensure dependencies are installed during initialization: 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 locate graph, evaluation, state, and orchestration responsibilities and avoid assuming one cloud plugin exposes the same resource semantics as another. 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 locate graph, evaluation, state, and orchestration responsibilities and avoid assuming one cloud plugin exposes the same resource semantics as another. Neither is the directly designated method for the separate goals of locate graph, evaluation, state, and orchestration responsibilities and avoid assuming one cloud plugin exposes the same resource semantics as another in this review.

Question 81

An engineer needs to avoid confusing multiple plugins with the same type suffix as part of an automated release. Which option is the best fit?

  1. Understand the implied empty default provider configuration
  2. Set provider = aws.west on a resource
  3. Use different local provider names for distinct plugin sources
  4. Declare required_providers separately in a child module
  5. Define an aliased provider block

Explanation

Correct Answer

C:

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. This directly supports the task to avoid confusing multiple plugins with the same type suffix during an infrastructure audit.

Incorrect Answers

A:

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. The stated requirement is to avoid confusing multiple plugins with the same type suffix, not to diagnose failures when only aliases are configured; this alternative addresses a different control or phase.

B:

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. That can be useful when the aim is to bind an individual resource to a nondefault provider configuration, but it does not directly deliver the requested ability to avoid confusing multiple plugins with the same type suffix.

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 avoid confusing multiple plugins with the same type suffix. It may support a related workflow, but the question specifically requires the mechanism for avoid confusing multiple plugins with the same type suffix rather than document the plugin source and compatibility constraints inside each module.

E:

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 avoid confusing multiple plugins with the same type suffix. The stated requirement is to avoid confusing multiple plugins with the same type suffix, not to create a second named configuration of the same provider; this alternative addresses a different control or phase.

Question 82

A team is investigating why Terraform recognizes remote objects. The requirement is to prevent unauthorized access to stored resource attributes. Which Terraform mechanism directly meets this requirement?

  1. Avoid manual state-file editing
  2. Distinguish a managed object from a data-source read
  3. Protect state as sensitive material
  4. Use state for dependency information
  5. Understand refresh during planning

Explanation

Correct Answer

C:

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 prevent unauthorized access to stored resource attributes. This directly supports the task to prevent unauthorized access to stored resource attributes during a planned migration.

Incorrect Answers

A:

terraform state operations and declarative moved/removed blocks are safer tools for intended transitions; hand-editing state can corrupt identifiers or dependencies; this behavior should be assessed against the concrete need to prevent unauthorized access to stored resource attributes. It may support a related workflow, but the question specifically requires the mechanism for prevent unauthorized access to stored resource attributes rather than preserve internal consistency of resource instance mappings.

B:

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 prevent unauthorized access to stored resource attributes. The stated requirement is to prevent unauthorized access to stored resource attributes, not to understand what Terraform considers its responsibility to change; this alternative addresses a different control or phase.

D:

State helps Terraform track relationships and objects that may no longer be present in configuration; its purpose extends beyond saving a copy of HCL source code; this behavior should be assessed against the concrete need to prevent unauthorized access to stored resource attributes. The distinction matters here: using that mechanism to retain references needed to reconcile previously created resources would still leave the objective to prevent unauthorized access to stored resource attributes unmet.

E:

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 prevent unauthorized access to stored resource attributes. It may support a related workflow, but the question specifically requires the mechanism for prevent unauthorized access to stored resource attributes rather than compare tracked objects against current provider-reported attributes.

Question 83

A Terraform rollout has separate acceptance criteria: verify installed provider packages against trusted recorded hashes and separate which plugin to install from how it authenticates and connects. Which combined approach directly satisfies the two criteria?

  1. Declare provider source under required_providers + Set a provider version constraint
  2. Understand checksums in the lock file + Distinguish provider requirements from provider configurations
  3. Understand checksums in the lock file + Commit .terraform.lock.hcl for reproducibility
  4. Use terraform init -lockfile=readonly in CI + Distinguish provider requirements from provider configurations

Explanation

Correct Answer

B:

For the first criterion, hashes help detect unexpected package changes; they do not validate that a plugin's credentials have sufficient rights at a remote API; this behavior should be assessed against the concrete need to verify installed provider packages against trusted recorded hashes and separate which plugin to install from how it authenticates and connects; this directly addresses the need to verify installed provider packages against trusted recorded hashes. For the separate second criterion, 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 verify installed provider packages against trusted recorded hashes and separate which plugin to install from how it authenticates and connects; this fulfills the need to separate which plugin to install from how it authenticates and connects. Together they cover the independent tasks of verify installed provider packages against trusted recorded hashes and separate which plugin to install from how it authenticates and connects without exchanging the responsibilities of these features.

Incorrect Answers

A:

The first measure is intended to identify the registry namespace and provider type to install: 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 verify installed provider packages against trusted recorded hashes and separate which plugin to install from how it authenticates and connects. The second measure is intended to restrict which plugin releases are eligible for installation: 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 verify installed provider packages against trusted recorded hashes and separate which plugin to install from how it authenticates and connects. Neither is the directly designated method for the separate goals of verify installed provider packages against trusted recorded hashes and separate which plugin to install from how it authenticates and connects in this review.

C:

The first measure meets the requirement to verify installed provider packages against trusted recorded hashes, but its partner serves a different role: The dependency lock file constrains selection in later runs and verifies packages; it is not a lock for module releases or a storage location for state; this behavior should be assessed against the concrete need to verify installed provider packages against trusted recorded hashes and separate which plugin to install from how it authenticates and connects. That second component is designed to record selected provider releases and package checksums across machines, so the still-missing criterion is to separate which plugin to install from how it authenticates and connects, while the first criterion remains verify installed provider packages against trusted recorded hashes.

D:

The second measure does meet the separate which plugin to install from how it authenticates and connects requirement, but the first is designed for another concern: 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 verify installed provider packages against trusted recorded hashes and separate which plugin to install from how it authenticates and connects. That first component is designed to prevent dependency initialization from changing the committed lock file, which does not accomplish the requested task to verify installed provider packages against trusted recorded hashes, even though the other measure satisfies separate which plugin to install from how it authenticates and connects.

Question 84

An engineer needs to map Terraform resource operations to a platform's API as part of an automated release. Which option is the best fit?

  1. Configure a provider's authentication
  2. Recognize a provider as an API plugin
  3. Use resource schemas as the authority on arguments
  4. Review provider documentation for sensitive attributes

Explanation

Correct Answer

B:

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 map Terraform resource operations to a platform's API. This directly supports the task to map Terraform resource operations to a platform's API during an infrastructure audit.

Incorrect Answers

A:

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 map Terraform resource operations to a platform's API. The distinction matters here: using that mechanism to supply credentials and settings needed for remote API requests would still leave the objective to map Terraform resource operations to a platform's API unmet.

C:

Each provider publishes expected types, optional fields, and computed fields; terraform validation can reject unsupported arguments even if their names look reasonable; this behavior should be assessed against the concrete need to map Terraform resource operations to a platform's API. The stated requirement is to map Terraform resource operations to a platform's API, not to understand why different resource types accept different attributes; this alternative addresses a different control or phase.

D:

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 map Terraform resource operations to a platform's API. That can be useful when the aim is to avoid assuming ordinary resource arguments hide secrets from state, but it does not directly deliver the requested ability to map Terraform resource operations to a platform's API.

Question 85

During a staged rollout, the team must accomplish all of these distinct aims: (1) ensure reads occur in the intended service account or region; (2) document the plugin source and compatibility constraints inside each module; (3) support a module that must address source and destination environments. Select exactly the three relevant mechanisms. Choose THREE.

  1. Declare required_providers separately in a child module
  2. Map multiple aliases for a cross-region child module
  3. Pass a providers map in a module call
  4. Bind a data source to the appropriate provider alias
  5. Inherit the default provider configuration into a child module
  6. Use different local provider names for distinct plugin sources

Explanation

Correct Answers

A:

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 ensure reads occur in the intended service account or region and document the plugin source and compatibility constraints inside each module and support a module that must address source and destination environments. This matches the distinct objective to document the plugin source and compatibility constraints inside each module; the remaining chosen features address ensure reads occur in the intended service account or region and support a module that must address source and destination environments.

B:

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 ensure reads occur in the intended service account or region and document the plugin source and compatibility constraints inside each module and support a module that must address source and destination environments. This matches the distinct objective to support a module that must address source and destination environments; the remaining chosen features address ensure reads occur in the intended service account or region and document the plugin source and compatibility constraints inside each module.

D:

Data sources accept provider selection as managed resources do; a lookup against the wrong default configuration may return the wrong object or no object; this behavior should be assessed against the concrete need to ensure reads occur in the intended service account or region and document the plugin source and compatibility constraints inside each module and support a module that must address source and destination environments. This matches the distinct objective to ensure reads occur in the intended service account or region; the remaining chosen features address document the plugin source and compatibility constraints inside each module and support a module that must address source and destination environments.

Incorrect Answers

C:

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 ensure reads occur in the intended service account or region and document the plugin source and compatibility constraints inside each module and support a module that must address source and destination environments. Its main application is to map a child module's expected provider names to root configurations; the checklist instead asks for ensure reads occur in the intended service account or region; and document the plugin source and compatibility constraints inside each module; and support a module that must address source and destination environments. None of those distinct criteria specifically calls for this alternative.

E:

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 ensure reads occur in the intended service account or region and document the plugin source and compatibility constraints inside each module and support a module that must address source and destination environments. Its main application is to use the parent's ordinary provider settings without manual remapping; the checklist instead asks for ensure reads occur in the intended service account or region; and document the plugin source and compatibility constraints inside each module; and support a module that must address source and destination environments. None of those distinct criteria specifically calls for this alternative.

F:

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 ensure reads occur in the intended service account or region and document the plugin source and compatibility constraints inside each module and support a module that must address source and destination environments. Its main application is to avoid confusing multiple plugins with the same type suffix; the checklist instead asks for ensure reads occur in the intended service account or region; and document the plugin source and compatibility constraints inside each module; and support a module that must address source and destination environments. None of those distinct criteria specifically calls for this alternative.

Question 86

During a module implementation, one task is to understand why unmanaged existing objects do not appear automatically, while another is to make one authoritative state accessible to a collaborating team. Select the matching pair of techniques.

  1. Understand one state per workspace boundary + Use a remote backend for shared state
  2. Recognize state does not equal a cloud inventory + Use a remote backend for shared state
  3. Understand refresh during planning + Distinguish a managed object from a data-source read
  4. Protect state as sensitive material + Use a remote backend for shared state
  5. Recognize state does not equal a cloud inventory + Treat state snapshots as recoverable but hazardous

Explanation

Correct Answer

B:

For the first criterion, terraform tracks objects that were created or imported into that workspace; it does not discover and adopt every service object merely because credentials permit seeing it; this behavior should be assessed against the concrete need to understand why unmanaged existing objects do not appear automatically and make one authoritative state accessible to a collaborating team; this directly addresses the need to understand why unmanaged existing objects do not appear automatically. For the separate second criterion, 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 understand why unmanaged existing objects do not appear automatically and make one authoritative state accessible to a collaborating team; this fulfills the need to make one authoritative state accessible to a collaborating team. Together they cover the independent tasks of understand why unmanaged existing objects do not appear automatically and make one authoritative state accessible to a collaborating team without exchanging the responsibilities of these features.

Incorrect Answers

A:

The second measure does meet the make one authoritative state accessible to a collaborating team requirement, but the first is designed for another concern: 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 understand why unmanaged existing objects do not appear automatically and make one authoritative state accessible to a collaborating team. That first component is designed to avoid mixing independent deployments unintentionally, which does not accomplish the requested task to understand why unmanaged existing objects do not appear automatically, even though the other measure satisfies make one authoritative state accessible to a collaborating team.

C:

The first measure is intended to compare tracked objects against current provider-reported attributes: 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 why unmanaged existing objects do not appear automatically and make one authoritative state accessible to a collaborating team. The second measure is intended to understand what Terraform considers its responsibility to change: 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 why unmanaged existing objects do not appear automatically and make one authoritative state accessible to a collaborating team. Neither is the directly designated method for the separate goals of understand why unmanaged existing objects do not appear automatically and make one authoritative state accessible to a collaborating team in this review.

D:

The second measure does meet the make one authoritative state accessible to a collaborating team requirement, but the first is designed for another concern: 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 why unmanaged existing objects do not appear automatically and make one authoritative state accessible to a collaborating team. That first component is designed to prevent unauthorized access to stored resource attributes, which does not accomplish the requested task to understand why unmanaged existing objects do not appear automatically, even though the other measure satisfies make one authoritative state accessible to a collaborating team.

E:

The first measure meets the requirement to understand why unmanaged existing objects do not appear automatically, but its partner serves a different role: 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 understand why unmanaged existing objects do not appear automatically and make one authoritative state accessible to a collaborating team. That second component is designed to plan how to protect, back up, and restore state deliberately, so the still-missing criterion is to make one authoritative state accessible to a collaborating team, while the first criterion remains understand why unmanaged existing objects do not appear automatically.

Question 87

An engineer needs to see the provider requirements for the root and child modules as part of an automated release. Which option is the best fit?

  1. Distinguish provider requirements from provider configurations
  2. Use TF_PLUGIN_CACHE_DIR for shared package caching
  3. Set a provider version constraint
  4. Inspect selected providers with terraform providers

Explanation

Correct Answer

D:

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 see the provider requirements for the root and child modules. This directly supports the task to see the provider requirements for the root and child modules during an infrastructure audit.

Incorrect Answers

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 see the provider requirements for the root and child modules. The stated requirement is to see the provider requirements for the root and child modules, not to separate which plugin to install from how it authenticates and connects; this alternative addresses a different control or phase.

B:

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 see the provider requirements for the root and child modules. That can be useful when the aim is to avoid repeatedly downloading the same provider binaries on a build host, but it does not directly deliver the requested ability to see the provider requirements for the root and child modules.

C:

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 see the provider requirements for the root and child modules. The distinction matters here: using that mechanism to restrict which plugin releases are eligible for installation would still leave the objective to see the provider requirements for the root and child modules unmet.

Question 88

An engineer is learning what Terraform Core delegates to plugins. The requirement is to distinguish a local provider name from its registry namespace. Which Terraform mechanism directly meets this requirement?

  1. Recognize a provider as an API plugin
  2. Configure a provider's authentication
  3. Handle provider-specific constraints
  4. Recognize provider source addresses

Explanation

Correct Answer

D:

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. This directly supports the task to distinguish a local provider name from its registry namespace during a planned migration.

Incorrect Answers

A:

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. It may support a related workflow, but the question specifically requires the mechanism for distinguish a local provider name from its registry namespace rather than map Terraform resource operations to a platform's API.

B:

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. The stated requirement is to distinguish a local provider name from its registry namespace, not to supply credentials and settings needed for remote API requests; this alternative addresses a different control or phase.

C:

Each service API determines supported operations, defaults, quotas, and replacement rules; the shared HCL syntax does not standardize these platform behaviors; this behavior should be assessed against the concrete need to distinguish a local provider name from its registry namespace. That can be useful when the aim is to avoid assuming one cloud plugin exposes the same resource semantics as another, but it does not directly deliver the requested ability to distinguish a local provider name from its registry namespace.

Question 89

A shared module needs more than one provider configuration. A reviewer must determine how to use the parent's ordinary provider settings without manual remapping. Which action is the appropriate choice?

  1. Avoid provider blocks inside reusable child modules
  2. Declare required_providers separately in a child module
  3. Understand the implied empty default provider configuration
  4. Inherit the default provider configuration into a child module
  5. Declare configuration_aliases in a child module

Explanation

Correct Answer

D:

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 use the parent's ordinary provider settings without manual remapping. This directly supports the task to use the parent's ordinary provider settings without manual remapping during a cross-team handoff.

Incorrect Answers

A:

Child modules designed for reuse should receive provider configurations from callers; embedded provider blocks conflict with some module meta-arguments, including for_each; this behavior should be assessed against the concrete need to use the parent's ordinary provider settings without manual remapping. The distinction matters here: using that mechanism to keep configurations controlled by the root for compatible module reuse would still leave the objective to use the parent's ordinary provider settings without manual remapping unmet.

B:

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 use the parent's ordinary provider settings without manual remapping. It may support a related workflow, but the question specifically requires the mechanism for use the parent's ordinary provider settings without manual remapping rather than document the plugin source and compatibility constraints inside each module.

C:

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 use the parent's ordinary provider settings without manual remapping. The stated requirement is to use the parent's ordinary provider settings without manual remapping, not to diagnose failures when only aliases are configured; this alternative addresses a different control or phase.

E:

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 use the parent's ordinary provider settings without manual remapping. The distinction matters here: using that mechanism to make additional provider configuration names available to child resources would still leave the objective to use the parent's ordinary provider settings without manual remapping unmet.

Question 90

A Terraform review separates 2 requirements: (1) retain references needed to reconcile previously created resources; (2) prevent unauthorized access to stored resource attributes. Identify the two features that each directly handle one of those requirements. Choose TWO.

  1. Treat state snapshots as recoverable but hazardous
  2. Recognize state does not equal a cloud inventory
  3. Use a remote backend for shared state
  4. Protect state as sensitive material
  5. Use state for dependency information

Explanation

Correct Answers

D:

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 retain references needed to reconcile previously created resources and prevent unauthorized access to stored resource attributes. This matches the distinct objective to prevent unauthorized access to stored resource attributes; the remaining chosen features address retain references needed to reconcile previously created resources.

E:

State helps Terraform track relationships and objects that may no longer be present in configuration; its purpose extends beyond saving a copy of HCL source code; this behavior should be assessed against the concrete need to retain references needed to reconcile previously created resources and prevent unauthorized access to stored resource attributes. This matches the distinct objective to retain references needed to reconcile previously created resources; the remaining chosen features address prevent unauthorized access to stored resource attributes.

Incorrect Answers

A:

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 retain references needed to reconcile previously created resources and prevent unauthorized access to stored resource attributes. Its main application is to plan how to protect, back up, and restore state deliberately; the checklist instead asks for retain references needed to reconcile previously created resources; and prevent unauthorized access to stored resource attributes. None of those distinct criteria specifically calls for this alternative.

B:

Terraform tracks objects that were created or imported into that workspace; it does not discover and adopt every service object merely because credentials permit seeing it; this behavior should be assessed against the concrete need to retain references needed to reconcile previously created resources and prevent unauthorized access to stored resource attributes. Its main application is to understand why unmanaged existing objects do not appear automatically; the checklist instead asks for retain references needed to reconcile previously created resources; and prevent unauthorized access to stored resource attributes. None of those distinct criteria specifically calls for this alternative.

C:

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 retain references needed to reconcile previously created resources and prevent unauthorized access to stored resource attributes. Its main application is to make one authoritative state accessible to a collaborating team; the checklist instead asks for retain references needed to reconcile previously created resources; and prevent unauthorized access to stored resource attributes. None of those distinct criteria specifically calls for this alternative.

HashiCorp Certified: Terraform Associate (Terraform Associate) Practice Tests