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

Question 70

A reviewer has to approve a two-part design: retain references needed to reconcile previously created resources; additionally, plan how to protect, back up, and restore state deliberately. Which option pairs the correct mechanisms?

  1. Treat state as the resource-address-to-object mapping + Treat state snapshots as recoverable but hazardous
  2. Use state for dependency information + Separate state from the desired configuration
  3. Identify stale state after out-of-band edits + Use a remote backend for shared state
  4. Use state for dependency information + Treat state snapshots as recoverable but hazardous

Explanation

Correct Answer

D:

For the first criterion, 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 plan how to protect, back up, and restore state deliberately; this directly addresses the need to retain references needed to reconcile previously created resources. For the separate second criterion, 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 plan how to protect, back up, and restore state deliberately; this fulfills the need to plan how to protect, back up, and restore state deliberately. Together they cover the independent tasks of retain references needed to reconcile previously created resources and plan how to protect, back up, and restore state deliberately without exchanging the responsibilities of these features.

Incorrect Answers

A:

The second measure does meet the plan how to protect, back up, and restore state deliberately requirement, but the first is designed for another concern: 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 retain references needed to reconcile previously created resources and plan how to protect, back up, and restore state deliberately. That first component is designed to identify which remote object Terraform currently manages for a resource block, which does not accomplish the requested task to retain references needed to reconcile previously created resources, even though the other measure satisfies plan how to protect, back up, and restore state deliberately.

B:

The first measure meets the requirement to retain references needed to reconcile previously created resources, but its partner serves a different role: Configuration declares intended resources while state records what Terraform tracks; removing a block can plan destruction unless a supported removal mechanism changes that intent; this behavior should be assessed against the concrete need to retain references needed to reconcile previously created resources and plan how to protect, back up, and restore state deliberately. That second component is designed to recognize that a state entry is not a request to keep an object forever, so the still-missing criterion is to plan how to protect, back up, and restore state deliberately, while the first criterion remains retain references needed to reconcile previously created resources.

C:

The first measure is intended to explain why plans may propose correcting unapproved changes: 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 retain references needed to reconcile previously created resources and plan how to protect, back up, and restore state deliberately. The second measure is intended to make one authoritative state accessible to a collaborating team: 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 plan how to protect, back up, and restore state deliberately. Neither is the directly designated method for the separate goals of retain references needed to reconcile previously created resources and plan how to protect, back up, and restore state deliberately in this review.

Question 71

A CI runner is reproducing dependency installations. The requirement is to restrict which plugin releases are eligible for installation. Which Terraform mechanism directly meets this requirement?

  1. Distinguish provider requirements from provider configurations
  2. Inspect selected providers with terraform providers
  3. Diagnose an incompatible version constraint intersection
  4. Commit .terraform.lock.hcl for reproducibility
  5. Set a provider version constraint

Explanation

Correct Answer

E:

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 restrict which plugin releases are eligible for installation. This directly supports the task to restrict which plugin releases are eligible for installation during an automated release.

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 restrict which plugin releases are eligible for installation. The stated requirement is to restrict which plugin releases are eligible for installation, not to separate which plugin to install from how it authenticates and connects; this alternative addresses a different control or phase.

B:

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 restrict which plugin releases are eligible for installation. That can be useful when the aim is to see the provider requirements for the root and child modules, but it does not directly deliver the requested ability to restrict which plugin releases are eligible for installation.

C:

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 restrict which plugin releases are eligible for installation. The distinction matters here: using that mechanism to recognize why two modules can prevent provider resolution would still leave the objective to restrict which plugin releases are eligible for installation unmet.

D:

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 restrict which plugin releases are eligible for installation. It may support a related workflow, but the question specifically requires the mechanism for restrict which plugin releases are eligible for installation rather than record selected provider releases and package checksums across machines.

Question 72

A workspace is evaluating resource types and provider configuration. A reviewer must determine how to locate graph, evaluation, state, and orchestration responsibilities. Which action is the appropriate choice?

  1. Use data sources to query remote APIs
  2. Review provider documentation for sensitive attributes
  3. Configure a provider's authentication
  4. Distinguish Terraform Core from provider plugins
  5. Read provider-computed attributes

Explanation

Correct Answer

D:

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. This directly supports the task to locate graph, evaluation, state, and orchestration responsibilities during a staged rollout.

Incorrect Answers

A:

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 locate graph, evaluation, state, and orchestration responsibilities. It may support a related workflow, but the question specifically requires the mechanism for locate graph, evaluation, state, and orchestration responsibilities rather than read information through a provider without declaring ownership of that object.

B:

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 locate graph, evaluation, state, and orchestration responsibilities. The stated requirement is to locate graph, evaluation, state, and orchestration responsibilities, not to avoid assuming ordinary resource arguments hide secrets from state; this alternative addresses a different control or phase.

C:

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 locate graph, evaluation, state, and orchestration responsibilities. That can be useful when the aim is to supply credentials and settings needed for remote API requests, but it does not directly deliver the requested ability to locate graph, evaluation, state, and orchestration responsibilities.

E:

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. It may support a related workflow, but the question specifically requires the mechanism for locate graph, evaluation, state, and orchestration responsibilities rather than use values learned only after resource creation or refresh.

Question 73

The immediate Terraform task is to bind an individual resource to a nondefault provider configuration. Which method handles that task most directly?

  1. Avoid provider blocks inside reusable child modules
  2. Set provider = aws.west on a resource
  3. Declare required_providers separately in a child module
  4. Inherit the default provider configuration into a child module
  5. Understand the implied empty default provider configuration

Explanation

Correct Answer

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 bind an individual resource to a nondefault provider configuration. This directly supports the task to bind an individual resource to a nondefault provider configuration during a configuration change.

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 bind an individual resource to a nondefault provider configuration. The distinction matters here: using that mechanism to keep configurations controlled by the root for compatible module reuse would still leave the objective to bind an individual resource to a nondefault provider configuration unmet.

C:

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 bind an individual resource to a nondefault provider configuration. The stated requirement is to bind an individual resource to a nondefault provider configuration, not to document the plugin source and compatibility constraints inside each module; this alternative addresses a different control or phase.

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 bind an individual resource to a nondefault provider configuration. That can be useful when the aim is to use the parent's ordinary provider settings without manual remapping, but it does not directly deliver the requested ability to bind an individual resource to a nondefault provider configuration.

E:

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 bind an individual resource to a nondefault provider configuration. The distinction matters here: using that mechanism to diagnose failures when only aliases are configured would still leave the objective to bind an individual resource to a nondefault provider configuration unmet.

Question 74

A Terraform rollout has separate acceptance criteria: recognize that a state entry is not a request to keep an object forever and understand what Terraform considers its responsibility to change. Which combined approach directly satisfies the two criteria?

  1. Recognize state does not equal a cloud inventory + Distinguish a managed object from a data-source read
  2. Identify stale state after out-of-band edits + Use a remote backend for shared state
  3. Separate state from the desired configuration + Treat state as the resource-address-to-object mapping
  4. Understand one state per workspace boundary + Distinguish a managed object from a data-source read
  5. Separate state from the desired configuration + Distinguish a managed object from a data-source read
  6. Separate state from the desired configuration + Protect state as sensitive material

Explanation

Correct Answer

E:

For the first criterion, configuration declares intended resources while state records what Terraform tracks; removing a block can plan destruction unless a supported removal mechanism changes that intent; this behavior should be assessed against the concrete need to recognize that a state entry is not a request to keep an object forever and understand what Terraform considers its responsibility to change; this directly addresses the need to recognize that a state entry is not a request to keep an object forever. For the separate second criterion, 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 recognize that a state entry is not a request to keep an object forever and understand what Terraform considers its responsibility to change; this fulfills the need to understand what Terraform considers its responsibility to change. Together they cover the independent tasks of recognize that a state entry is not a request to keep an object forever and understand what Terraform considers its responsibility to change without exchanging the responsibilities of these features.

Incorrect Answers

A:

The second measure does meet the understand what Terraform considers its responsibility to change requirement, but the first is designed for another concern: 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 recognize that a state entry is not a request to keep an object forever and understand what Terraform considers its responsibility to change. That first component is designed to understand why unmanaged existing objects do not appear automatically, which does not accomplish the requested task to recognize that a state entry is not a request to keep an object forever, even though the other measure satisfies understand what Terraform considers its responsibility to change.

B:

The first measure is intended to explain why plans may propose correcting unapproved changes: 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 recognize that a state entry is not a request to keep an object forever and understand what Terraform considers its responsibility to change. The second measure is intended to make one authoritative state accessible to a collaborating team: 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 recognize that a state entry is not a request to keep an object forever and understand what Terraform considers its responsibility to change. Neither is the directly designated method for the separate goals of recognize that a state entry is not a request to keep an object forever and understand what Terraform considers its responsibility to change in this review.

C:

The first measure meets the requirement to recognize that a state entry is not a request to keep an object forever, but its partner serves a different role: 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 recognize that a state entry is not a request to keep an object forever and understand what Terraform considers its responsibility to change. That second component is designed to identify which remote object Terraform currently manages for a resource block, so the still-missing criterion is to understand what Terraform considers its responsibility to change, while the first criterion remains recognize that a state entry is not a request to keep an object forever.

D:

The second measure does meet the understand what Terraform considers its responsibility to change 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 recognize that a state entry is not a request to keep an object forever and understand what Terraform considers its responsibility to change. That first component is designed to avoid mixing independent deployments unintentionally, which does not accomplish the requested task to recognize that a state entry is not a request to keep an object forever, even though the other measure satisfies understand what Terraform considers its responsibility to change.

F:

The first measure meets the requirement to recognize that a state entry is not a request to keep an object forever, but its partner serves a different role: 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 recognize that a state entry is not a request to keep an object forever and understand what Terraform considers its responsibility to change. That second component is designed to prevent unauthorized access to stored resource attributes, so the still-missing criterion is to understand what Terraform considers its responsibility to change, while the first criterion remains recognize that a state entry is not a request to keep an object forever.

Question 75

During a deployment checklist, one task is to reselect newer eligible provider releases within declared constraints, while another is to verify installed provider packages against trusted recorded hashes. Select the matching pair of techniques.

  1. Diagnose an incompatible version constraint intersection + Understand checksums in the lock file
  2. Run terraform init -upgrade deliberately + Understand checksums in the lock file
  3. Use TF_PLUGIN_CACHE_DIR for shared package caching + Understand checksums in the lock file
  4. Declare provider source under required_providers + Run terraform init to install plugins
  5. Run terraform init -upgrade deliberately + Set a provider version constraint

Explanation

Correct Answer

B:

For the first criterion, upgrade mode asks Terraform to reconsider provider and module selections instead of preserving the existing lockfile choice; it still respects configured version requirements; this behavior should be assessed against the concrete need to reselect newer eligible provider releases within declared constraints and verify installed provider packages against trusted recorded hashes; this directly addresses the need to reselect newer eligible provider releases within declared constraints. For the separate second 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 reselect newer eligible provider releases within declared constraints and verify installed provider packages against trusted recorded hashes; this fulfills the need to verify installed provider packages against trusted recorded hashes. Together they cover the independent tasks of reselect newer eligible provider releases within declared constraints and verify installed provider packages against trusted recorded hashes without exchanging the responsibilities of these features.

Incorrect Answers

A:

The second measure does meet the verify installed provider packages against trusted recorded hashes 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 reselect newer eligible provider releases within declared constraints and verify installed provider packages against trusted recorded hashes. That first component is designed to recognize why two modules can prevent provider resolution, which does not accomplish the requested task to reselect newer eligible provider releases within declared constraints, even though the other measure satisfies verify installed provider packages against trusted recorded hashes.

C:

The second measure does meet the verify installed provider packages against trusted recorded hashes requirement, but the first is designed for another concern: 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 reselect newer eligible provider releases within declared constraints and verify installed provider packages against trusted recorded hashes. That first component is designed to avoid repeatedly downloading the same provider binaries on a build host, which does not accomplish the requested task to reselect newer eligible provider releases within declared constraints, even though the other measure satisfies verify installed provider packages against trusted recorded hashes.

D:

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 reselect newer eligible provider releases within declared constraints and verify installed provider packages against trusted recorded hashes. The second measure is intended to download and initialize missing required providers: 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 reselect newer eligible provider releases within declared constraints and verify installed provider packages against trusted recorded hashes. Neither is the directly designated method for the separate goals of reselect newer eligible provider releases within declared constraints and verify installed provider packages against trusted recorded hashes in this review.

E:

The first measure meets the requirement to reselect newer eligible provider releases within declared constraints, but its partner serves a different role: 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 reselect newer eligible provider releases within declared constraints and verify installed provider packages against trusted recorded hashes. That second component is designed to restrict which plugin releases are eligible for installation, so the still-missing criterion is to verify installed provider packages against trusted recorded hashes, while the first criterion remains reselect newer eligible provider releases within declared constraints.

Question 76

A reviewer has to approve a two-part design: understand how an unqualified resource chooses its default provider; additionally, read information through a provider without declaring ownership of that object. Which option pairs the correct mechanisms?

  1. Read provider-computed attributes + Use data sources to query remote APIs
  2. Select a provider using the resource type prefix + Avoid assuming providers install automatically at apply
  3. Use resource schemas as the authority on arguments + Recognize a provider as an API plugin
  4. Select a provider using the resource type prefix + Use data sources to query remote APIs
  5. Review provider documentation for sensitive attributes + Use data sources to query remote APIs

Explanation

Correct Answer

D:

For the first criterion, 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 understand how an unqualified resource chooses its default provider and read information through a provider without declaring ownership of that object; this directly addresses the need to understand how an unqualified resource chooses its default provider. For the separate second 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 understand how an unqualified resource chooses its default provider and read information through a provider without declaring ownership of that object; this fulfills the need to read information through a provider without declaring ownership of that object. Together they cover the independent tasks of understand how an unqualified resource chooses its default provider and read information through a provider without declaring ownership of that object without exchanging the responsibilities of these features.

Incorrect Answers

A:

The second measure does meet the read information through a provider without declaring ownership of that object requirement, but the first is designed for another concern: 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 understand how an unqualified resource chooses its default provider and read information through a provider without declaring ownership of that object. That first component is designed to use values learned only after resource creation or refresh, which does not accomplish the requested task to understand how an unqualified resource chooses its default provider, even though the other measure satisfies read information through a provider without declaring ownership of that object.

B:

The first measure meets the requirement to understand how an unqualified resource chooses its default provider, but its partner serves a different role: 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 understand how an unqualified resource chooses its default provider and read information through a provider without declaring ownership of that object. That second component is designed to ensure dependencies are installed during initialization, so the still-missing criterion is to read information through a provider without declaring ownership of that object, while the first criterion remains understand how an unqualified resource chooses its default provider.

C:

The first measure is intended to understand why different resource types accept different attributes: 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 understand how an unqualified resource chooses its default provider and read information through a provider without declaring ownership of that object. The second measure is intended to map Terraform resource operations to a platform's API: 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 understand how an unqualified resource chooses its default provider and read information through a provider without declaring ownership of that object. Neither is the directly designated method for the separate goals of understand how an unqualified resource chooses its default provider and read information through a provider without declaring ownership of that object in this review.

E:

The second measure does meet the read information through a provider without declaring ownership of that object requirement, but the first is designed for another concern: 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 understand how an unqualified resource chooses its default provider and read information through a provider without declaring ownership of that object. That first component is designed to avoid assuming ordinary resource arguments hide secrets from state, which does not accomplish the requested task to understand how an unqualified resource chooses its default provider, even though the other measure satisfies read information through a provider without declaring ownership of that object.

Question 77

A Terraform rollout has separate acceptance criteria: diagnose failures when only aliases are configured and write the meta-argument as a provider configuration reference. Which combined approach directly satisfies the two criteria?

  1. Understand the implied empty default provider configuration + Bind a data source to the appropriate provider alias
  2. Declare configuration_aliases in a child module + Reference a provider alias without quotation marks
  3. Define an aliased provider block + Map multiple aliases for a cross-region child module
  4. Avoid provider blocks inside reusable child modules + Reference a provider alias without quotation marks
  5. Understand the implied empty default provider configuration + Reference a provider alias without quotation marks

Explanation

Correct Answer

E:

For the first 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 diagnose failures when only aliases are configured and write the meta-argument as a provider configuration reference; this directly addresses the need to diagnose failures when only aliases are configured. For the separate second criterion, syntax such as provider = aws.west names the configuration; putting the reference in a string changes it from a provider reference and is not valid usage; this behavior should be assessed against the concrete need to diagnose failures when only aliases are configured and write the meta-argument as a provider configuration reference; this fulfills the need to write the meta-argument as a provider configuration reference. Together they cover the independent tasks of diagnose failures when only aliases are configured and write the meta-argument as a provider configuration reference without exchanging the responsibilities of these features.

Incorrect Answers

A:

The first measure meets the requirement to diagnose failures when only aliases are configured, but its partner serves a different role: 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 diagnose failures when only aliases are configured and write the meta-argument as a provider configuration reference. That second component is designed to ensure reads occur in the intended service account or region, so the still-missing criterion is to write the meta-argument as a provider configuration reference, while the first criterion remains diagnose failures when only aliases are configured.

B:

The second measure does meet the write the meta-argument as a provider configuration reference requirement, but the first is designed for another concern: 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 diagnose failures when only aliases are configured and write the meta-argument as a provider configuration reference. That first component is designed to make additional provider configuration names available to child resources, which does not accomplish the requested task to diagnose failures when only aliases are configured, even though the other measure satisfies write the meta-argument as a provider configuration reference.

C:

The first measure is intended to create a second named configuration of the same provider: 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 diagnose failures when only aliases are configured and write the meta-argument as a provider configuration reference. The second measure is intended to support a module that must address source and destination environments: 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 diagnose failures when only aliases are configured and write the meta-argument as a provider configuration reference. Neither is the directly designated method for the separate goals of diagnose failures when only aliases are configured and write the meta-argument as a provider configuration reference in this review.

D:

The second measure does meet the write the meta-argument as a provider configuration reference requirement, but the first is designed for another concern: 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 diagnose failures when only aliases are configured and write the meta-argument as a provider configuration reference. That first component is designed to keep configurations controlled by the root for compatible module reuse, which does not accomplish the requested task to diagnose failures when only aliases are configured, even though the other measure satisfies write the meta-argument as a provider configuration reference.

Question 78

An administrator needs to understand a plan that touches existing objects. The team must both preserve internal consistency of resource instance mappings and explain why plans may propose correcting unapproved changes. Which paired choice implements those distinct goals?

  1. Protect state as sensitive material + Identify stale state after out-of-band edits
  2. Avoid manual state-file editing + Understand one state per workspace boundary
  3. Avoid manual state-file editing + Separate state from the desired configuration
  4. Understand refresh during planning + Identify stale state after out-of-band edits
  5. Avoid manual state-file editing + Identify stale state after out-of-band edits
  6. Use a remote backend for shared state + Distinguish a managed object from a data-source read

Explanation

Correct Answer

E:

For the first criterion, 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 preserve internal consistency of resource instance mappings and explain why plans may propose correcting unapproved changes; this directly addresses the need to preserve internal consistency of resource instance mappings. For the separate second criterion, 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 preserve internal consistency of resource instance mappings and explain why plans may propose correcting unapproved changes; this fulfills the need to explain why plans may propose correcting unapproved changes. Together they cover the independent tasks of preserve internal consistency of resource instance mappings and explain why plans may propose correcting unapproved changes without exchanging the responsibilities of these features.

Incorrect Answers

A:

The second measure does meet the explain why plans may propose correcting unapproved changes 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 preserve internal consistency of resource instance mappings and explain why plans may propose correcting unapproved changes. That first component is designed to prevent unauthorized access to stored resource attributes, which does not accomplish the requested task to preserve internal consistency of resource instance mappings, even though the other measure satisfies explain why plans may propose correcting unapproved changes.

B:

The first measure meets the requirement to preserve internal consistency of resource instance mappings, but its partner serves a different role: 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 preserve internal consistency of resource instance mappings and explain why plans may propose correcting unapproved changes. That second component is designed to avoid mixing independent deployments unintentionally, so the still-missing criterion is to explain why plans may propose correcting unapproved changes, while the first criterion remains preserve internal consistency of resource instance mappings.

C:

The first measure meets the requirement to preserve internal consistency of resource instance mappings, but its partner serves a different role: Configuration declares intended resources while state records what Terraform tracks; removing a block can plan destruction unless a supported removal mechanism changes that intent; this behavior should be assessed against the concrete need to preserve internal consistency of resource instance mappings and explain why plans may propose correcting unapproved changes. That second component is designed to recognize that a state entry is not a request to keep an object forever, so the still-missing criterion is to explain why plans may propose correcting unapproved changes, while the first criterion remains preserve internal consistency of resource instance mappings.

D:

The second measure does meet the explain why plans may propose correcting unapproved changes requirement, but the first is designed for another concern: 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 preserve internal consistency of resource instance mappings and explain why plans may propose correcting unapproved changes. That first component is designed to compare tracked objects against current provider-reported attributes, which does not accomplish the requested task to preserve internal consistency of resource instance mappings, even though the other measure satisfies explain why plans may propose correcting unapproved changes.

F:

The first measure is intended to make one authoritative state accessible to a collaborating team: 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 preserve internal consistency of resource instance mappings and explain why plans may propose correcting unapproved changes. 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 preserve internal consistency of resource instance mappings and explain why plans may propose correcting unapproved changes. Neither is the directly designated method for the separate goals of preserve internal consistency of resource instance mappings and explain why plans may propose correcting unapproved changes in this review.

Question 79

During a deployment checklist, the team must accomplish all of these distinct aims: (1) see the provider requirements for the root and child modules; (2) avoid repeatedly downloading the same provider binaries on a build host. Select exactly the two relevant mechanisms. Choose TWO.

  1. Run terraform init to install plugins
  2. Run terraform init -upgrade deliberately
  3. Constrain required_version for Terraform Core
  4. Understand checksums in the lock file
  5. Inspect selected providers with terraform providers
  6. Use TF_PLUGIN_CACHE_DIR for shared package caching

Explanation

Correct Answers

E:

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 and avoid repeatedly downloading the same provider binaries on a build host. This matches the distinct objective to see the provider requirements for the root and child modules; the remaining chosen features address avoid repeatedly downloading the same provider binaries on a build host.

F:

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 and avoid repeatedly downloading the same provider binaries on a build host. This matches the distinct objective to avoid repeatedly downloading the same provider binaries on a build host; the remaining chosen features address see the provider requirements for the root and child modules.

Incorrect Answers

A:

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 see the provider requirements for the root and child modules and avoid repeatedly downloading the same provider binaries on a build host. Its main application is to download and initialize missing required providers; the checklist instead asks for see the provider requirements for the root and child modules; and avoid repeatedly downloading the same provider binaries on a build host. None of those distinct criteria specifically calls for this alternative.

B:

Upgrade mode asks Terraform to reconsider provider and module selections instead of preserving the existing lockfile choice; it still respects configured version requirements; this behavior should be assessed against the concrete need to see the provider requirements for the root and child modules and avoid repeatedly downloading the same provider binaries on a build host. Its main application is to reselect newer eligible provider releases within declared constraints; the checklist instead asks for see the provider requirements for the root and child modules; and avoid repeatedly downloading the same provider binaries on a build host. None of those distinct criteria specifically calls for this alternative.

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 see the provider requirements for the root and child modules and avoid repeatedly downloading the same provider binaries on a build host. Its main application is to specify which Terraform CLI versions may interpret this configuration; the checklist instead asks for see the provider requirements for the root and child modules; and avoid repeatedly downloading the same provider binaries on a build host. None of those distinct criteria specifically calls for this alternative.

D:

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 see the provider requirements for the root and child modules and avoid repeatedly downloading the same provider binaries on a build host. Its main application is to verify installed provider packages against trusted recorded hashes; the checklist instead asks for see the provider requirements for the root and child modules; and avoid repeatedly downloading the same provider binaries on a build host. None of those distinct criteria specifically calls for this alternative.

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.

HashiCorp Certified: Terraform Associate (Terraform Associate) Practice Tests