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.
- Treat state snapshots as recoverable but hazardous
- Recognize state does not equal a cloud inventory
- Use a remote backend for shared state
- Protect state as sensitive material
- 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.
Question 91
A Terraform repository is introducing a provider upgrade policy. Two independent changes are requested: first, prevent dependency initialization from changing the committed lock file; second, specify which Terraform CLI versions may interpret this configuration. Which pair of measures fulfills both?
- Use
TF_PLUGIN_CACHE_DIR for shared package caching + Declare provider source under required_providers
- Run
terraform init to install plugins + Constrain required_version for Terraform Core
- Use
terraform init -lockfile=readonly in CI + Constrain required_version for Terraform Core
- Use
terraform init -lockfile=readonly in CI + Diagnose an incompatible version constraint intersection
Explanation
Correct Answer
C:For the first criterion, 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 prevent dependency initialization from changing the committed lock file and specify which Terraform CLI versions may interpret this configuration; this directly addresses the need to prevent dependency initialization from changing the committed lock file. For the separate second criterion, 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 prevent dependency initialization from changing the committed lock file and specify which Terraform CLI versions may interpret this configuration; this fulfills the need to specify which Terraform CLI versions may interpret this configuration. Together they cover the independent tasks of prevent dependency initialization from changing the committed lock file and specify which Terraform CLI versions may interpret this configuration without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure is intended to avoid repeatedly downloading the same provider binaries on a build host: 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 prevent dependency initialization from changing the committed lock file and specify which Terraform CLI versions may interpret this configuration. The second 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 prevent dependency initialization from changing the committed lock file and specify which Terraform CLI versions may interpret this configuration. Neither is the directly designated method for the separate goals of prevent dependency initialization from changing the committed lock file and specify which Terraform CLI versions may interpret this configuration in this review.
B:The second measure does meet the specify which Terraform CLI versions may interpret this configuration requirement, but the first is designed for another concern: 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 prevent dependency initialization from changing the committed lock file and specify which Terraform CLI versions may interpret this configuration. That first component is designed to download and initialize missing required providers, which does not accomplish the requested task to prevent dependency initialization from changing the committed lock file, even though the other measure satisfies specify which Terraform CLI versions may interpret this configuration.
D:The first measure meets the requirement to prevent dependency initialization from changing the committed lock file, but its partner serves a different role: 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 prevent dependency initialization from changing the committed lock file and specify which Terraform CLI versions may interpret this configuration. That second component is designed to recognize why two modules can prevent provider resolution, so the still-missing criterion is to specify which Terraform CLI versions may interpret this configuration, while the first criterion remains prevent dependency initialization from changing the committed lock file.
Question 92
During a module implementation, one task is to avoid assuming one cloud plugin exposes the same resource semantics as another, while another is to distinguish a local provider name from its registry namespace. Select the matching pair of techniques.
- Review provider documentation for sensitive attributes + Read provider-computed attributes
- Handle provider-specific constraints + Recognize provider source addresses
- Recognize a provider as an API plugin + Recognize provider source addresses
- Handle provider-specific constraints + Select a provider using the resource type prefix
Explanation
Correct Answer
B:For the first 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 avoid assuming one cloud plugin exposes the same resource semantics as another and distinguish a local provider name from its registry namespace; this directly addresses the need to avoid assuming one cloud plugin exposes the same resource semantics as another. For the separate second criterion, the source includes registry host, namespace, and type when fully qualified; local names let modules refer to that provider without repeating its entire address; this behavior should be assessed against the concrete need to avoid assuming one cloud plugin exposes the same resource semantics as another and distinguish a local provider name from its registry namespace; this fulfills the need to distinguish a local provider name from its registry namespace. Together they cover the independent tasks of avoid assuming one cloud plugin exposes the same resource semantics as another and distinguish a local provider name from its registry namespace without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure is intended to avoid assuming ordinary resource arguments hide secrets from state: 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 avoid assuming one cloud plugin exposes the same resource semantics as another and distinguish a local provider name from its registry namespace. The second measure is intended to use values learned only after resource creation or refresh: A provider may return IDs or addresses that were unknown during initial planning; terraform can propagate unknown values through references until the apply produces them; this behavior should be assessed against the concrete need to avoid assuming one cloud plugin exposes the same resource semantics as another and distinguish a local provider name from its registry namespace. Neither is the directly designated method for the separate goals of avoid assuming one cloud plugin exposes the same resource semantics as another and distinguish a local provider name from its registry namespace in this review.
C:The second measure does meet the distinguish a local provider name from its registry namespace 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 avoid assuming one cloud plugin exposes the same resource semantics as another and distinguish a local provider name from its registry namespace. That first component is designed to map Terraform resource operations to a platform's API, which does not accomplish the requested task to avoid assuming one cloud plugin exposes the same resource semantics as another, even though the other measure satisfies distinguish a local provider name from its registry namespace.
D:The first measure meets the requirement to avoid assuming one cloud plugin exposes the same resource semantics as another, but its partner serves a different role: 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 avoid assuming one cloud plugin exposes the same resource semantics as another and distinguish a local provider name from its registry namespace. That second component is designed to understand how an unqualified resource chooses its default provider, so the still-missing criterion is to distinguish a local provider name from its registry namespace, while the first criterion remains avoid assuming one cloud plugin exposes the same resource semantics as another.
Question 93
The immediate Terraform task is to keep configurations controlled by the root for compatible module reuse. Which method handles that task most directly?
- Avoid provider blocks inside reusable child modules
- Define an aliased
provider block
- Pass a
providers map in a module call
- Understand the implied empty default provider configuration
Explanation
Correct Answer
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 keep configurations controlled by the root for compatible module reuse. This directly supports the task to keep configurations controlled by the root for compatible module reuse during a platform review.
Incorrect Answers
B: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 keep configurations controlled by the root for compatible module reuse. The stated requirement is to keep configurations controlled by the root for compatible module reuse, not to create a second named configuration of the same provider; this alternative addresses a different control or phase.
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 keep configurations controlled by the root for compatible module reuse. That can be useful when the aim is to map a child module's expected provider names to root configurations, but it does not directly deliver the requested ability to keep configurations controlled by the root for compatible module reuse.
D: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 keep configurations controlled by the root for compatible module reuse. The distinction matters here: using that mechanism to diagnose failures when only aliases are configured would still leave the objective to keep configurations controlled by the root for compatible module reuse unmet.
Question 94
A Terraform rollout has separate acceptance criteria: compare tracked objects against current provider-reported attributes and recognize that a state entry is not a request to keep an object forever. Which combined approach directly satisfies the two criteria?
- Protect state as sensitive material + Separate state from the desired configuration
- Understand refresh during planning + Separate state from the desired configuration
- Understand refresh during planning + Treat state as the resource-address-to-object mapping
- Use a remote backend for shared state + Separate state from the desired configuration
- Identify stale state after out-of-band edits + Understand one state per workspace boundary
Explanation
Correct Answer
B:For the first criterion, 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 compare tracked objects against current provider-reported attributes and recognize that a state entry is not a request to keep an object forever; this directly addresses the need to compare tracked objects against current provider-reported attributes. For the separate second 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 compare tracked objects against current provider-reported attributes and recognize that a state entry is not a request to keep an object forever; this fulfills the need to recognize that a state entry is not a request to keep an object forever. Together they cover the independent tasks of compare tracked objects against current provider-reported attributes and recognize that a state entry is not a request to keep an object forever without exchanging the responsibilities of these features.
Incorrect Answers
A:The second measure does meet the recognize that a state entry is not a request to keep an object forever 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 compare tracked objects against current provider-reported attributes and recognize that a state entry is not a request to keep an object forever. That first component is designed to prevent unauthorized access to stored resource attributes, which does not accomplish the requested task to compare tracked objects against current provider-reported attributes, even though the other measure satisfies recognize that a state entry is not a request to keep an object forever.
C:The first measure meets the requirement to compare tracked objects against current provider-reported attributes, 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 compare tracked objects against current provider-reported attributes and recognize that a state entry is not a request to keep an object forever. That second component is designed to identify which remote object Terraform currently manages for a resource block, so the still-missing criterion is to recognize that a state entry is not a request to keep an object forever, while the first criterion remains compare tracked objects against current provider-reported attributes.
D:The second measure does meet the recognize that a state entry is not a request to keep an object forever requirement, but the first is designed for another concern: 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 compare tracked objects against current provider-reported attributes and recognize that a state entry is not a request to keep an object forever. That first component is designed to make one authoritative state accessible to a collaborating team, which does not accomplish the requested task to compare tracked objects against current provider-reported attributes, even though the other measure satisfies recognize that a state entry is not a request to keep an object forever.
E: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 compare tracked objects against current provider-reported attributes and recognize that a state entry is not a request to keep an object forever. The second measure is intended to avoid mixing independent deployments unintentionally: 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 compare tracked objects against current provider-reported attributes and recognize that a state entry is not a request to keep an object forever. Neither is the directly designated method for the separate goals of compare tracked objects against current provider-reported attributes and recognize that a state entry is not a request to keep an object forever in this review.
Question 95
A CI runner is reproducing dependency installations. The checklist contains independent tasks: (1) see the provider requirements for the root and child modules; (2) reselect newer eligible provider releases within declared constraints; (3) record selected provider releases and package checksums across machines. Which three options directly correspond to the respective tasks? Choose THREE.
- Run
terraform init to install plugins
- Commit
.terraform.lock.hcl for reproducibility
- Constrain
required_version for Terraform Core
- Inspect selected providers with
terraform providers
- Use
TF_PLUGIN_CACHE_DIR for shared package caching
- Run
terraform init -upgrade deliberately
Explanation
Correct Answers
B: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 see the provider requirements for the root and child modules and reselect newer eligible provider releases within declared constraints and record selected provider releases and package checksums across machines. This matches the distinct objective to record selected provider releases and package checksums across machines; the remaining chosen features address see the provider requirements for the root and child modules and reselect newer eligible provider releases within declared constraints.
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 and reselect newer eligible provider releases within declared constraints and record selected provider releases and package checksums across machines. This matches the distinct objective to see the provider requirements for the root and child modules; the remaining chosen features address reselect newer eligible provider releases within declared constraints and record selected provider releases and package checksums across machines.
F: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 reselect newer eligible provider releases within declared constraints and record selected provider releases and package checksums across machines. This matches the distinct objective to reselect newer eligible provider releases within declared constraints; the remaining chosen features address see the provider requirements for the root and child modules and record selected provider releases and package checksums across machines.
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 reselect newer eligible provider releases within declared constraints and record selected provider releases and package checksums across machines. 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 reselect newer eligible provider releases within declared constraints; and record selected provider releases and package checksums across machines. 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 reselect newer eligible provider releases within declared constraints and record selected provider releases and package checksums across machines. 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 reselect newer eligible provider releases within declared constraints; and record selected provider releases and package checksums across machines. None of those distinct criteria specifically calls for this alternative.
E: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 reselect newer eligible provider releases within declared constraints and record selected provider releases and package checksums across machines. Its main application is to avoid repeatedly downloading the same provider binaries on a build host; the checklist instead asks for see the provider requirements for the root and child modules; and reselect newer eligible provider releases within declared constraints; and record selected provider releases and package checksums across machines. None of those distinct criteria specifically calls for this alternative.
Question 96
A reviewer has to approve a two-part design: separate provider release changes from upgrading Terraform CLI; additionally, ensure dependencies are installed during initialization. Which option pairs the correct mechanisms?
- Understand a provider plugin's version independence + Avoid assuming providers install automatically at apply
- Recognize provider source addresses + Avoid assuming providers install automatically at apply
- Use data sources to query remote APIs + Review provider documentation for sensitive attributes
- Understand a provider plugin's version independence + Handle provider-specific constraints
Explanation
Correct Answer
A:For the first criterion, 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 separate provider release changes from upgrading Terraform CLI and ensure dependencies are installed during initialization; this directly addresses the need to separate provider release changes from upgrading Terraform CLI. For the separate second criterion, 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 separate provider release changes from upgrading Terraform CLI and ensure dependencies are installed during initialization; this fulfills the need to ensure dependencies are installed during initialization. Together they cover the independent tasks of separate provider release changes from upgrading Terraform CLI and ensure dependencies are installed during initialization without exchanging the responsibilities of these features.
Incorrect Answers
B:The second measure does meet the ensure dependencies are installed during initialization 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 separate provider release changes from upgrading Terraform CLI and ensure dependencies are installed during initialization. That first component is designed to distinguish a local provider name from its registry namespace, which does not accomplish the requested task to separate provider release changes from upgrading Terraform CLI, even though the other measure satisfies ensure dependencies are installed during initialization.
C:The first measure is intended to read information through a provider without declaring ownership of that object: 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 separate provider release changes from upgrading Terraform CLI and ensure dependencies are installed during initialization. The second measure is intended to avoid assuming ordinary resource arguments hide secrets from state: 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 separate provider release changes from upgrading Terraform CLI and ensure dependencies are installed during initialization. Neither is the directly designated method for the separate goals of separate provider release changes from upgrading Terraform CLI and ensure dependencies are installed during initialization in this review.
D:The first measure meets the requirement to separate provider release changes from upgrading Terraform CLI, but its partner serves a different role: 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 separate provider release changes from upgrading Terraform CLI and ensure dependencies are installed during initialization. That second component is designed to avoid assuming one cloud plugin exposes the same resource semantics as another, so the still-missing criterion is to ensure dependencies are installed during initialization, while the first criterion remains separate provider release changes from upgrading Terraform CLI.
Question 97
A Terraform rollout has separate acceptance criteria: use the parent's ordinary provider settings without manual remapping and avoid confusing multiple plugins with the same type suffix. Which combined approach directly satisfies the two criteria?
- Map multiple aliases for a cross-region child module + Use different local provider names for distinct plugin sources
- Inherit the default provider configuration into a child module + Use different local provider names for distinct plugin sources
- Understand the implied empty default provider configuration + Pass a
providers map in a module call
- Inherit the default provider configuration into a child module + Avoid provider blocks inside reusable child modules
Explanation
Correct Answer
B:For the first criterion, 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 and avoid confusing multiple plugins with the same type suffix; this directly addresses the need to use the parent's ordinary provider settings without manual remapping. For the separate second criterion, the local name maps a provider source to an identifier in a module; two sources require distinct local names even if their human-facing functions overlap; this behavior should be assessed against the concrete need to use the parent's ordinary provider settings without manual remapping and avoid confusing multiple plugins with the same type suffix; this fulfills the need to avoid confusing multiple plugins with the same type suffix. Together they cover the independent tasks of use the parent's ordinary provider settings without manual remapping and avoid confusing multiple plugins with the same type suffix without exchanging the responsibilities of these features.
Incorrect Answers
A:The second measure does meet the avoid confusing multiple plugins with the same type suffix requirement, but the first is designed for another concern: 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 use the parent's ordinary provider settings without manual remapping and avoid confusing multiple plugins with the same type suffix. That first component is designed to support a module that must address source and destination environments, which does not accomplish the requested task to use the parent's ordinary provider settings without manual remapping, even though the other measure satisfies avoid confusing multiple plugins with the same type suffix.
C:The first measure is intended to diagnose failures when only aliases are configured: 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 and avoid confusing multiple plugins with the same type suffix. The second measure is intended to map a child module's expected provider names to root configurations: Module provider mappings decide which configurations each child resource receives; the entries reference provider instances, not plain strings of region names; this behavior should be assessed against the concrete need to use the parent's ordinary provider settings without manual remapping and avoid confusing multiple plugins with the same type suffix. Neither is the directly designated method for the separate goals of use the parent's ordinary provider settings without manual remapping and avoid confusing multiple plugins with the same type suffix in this review.
D:The first measure meets the requirement to use the parent's ordinary provider settings without manual remapping, but its partner serves a different role: 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 and avoid confusing multiple plugins with the same type suffix. That second component is designed to keep configurations controlled by the root for compatible module reuse, so the still-missing criterion is to avoid confusing multiple plugins with the same type suffix, while the first criterion remains use the parent's ordinary provider settings without manual remapping.
Question 98
An engineer needs to make one authoritative state accessible to a collaborating team as part of a planned migration. Which option is the best fit?
- Use state for dependency information
- Use a remote backend for shared state
- Distinguish a managed object from a data-source read
- Treat state as the resource-address-to-object mapping
- Identify stale state after out-of-band edits
Explanation
Correct Answer
B: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 make one authoritative state accessible to a collaborating team. This directly supports the task to make one authoritative state accessible to a collaborating team during a maintenance request.
Incorrect Answers
A: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 make one authoritative state accessible to a collaborating team. It may support a related workflow, but the question specifically requires the mechanism for make one authoritative state accessible to a collaborating team rather than retain references needed to reconcile previously created resources.
C: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 make one authoritative state accessible to a collaborating team. That can be useful when the aim is to understand what Terraform considers its responsibility to change, but it does not directly deliver the requested ability to make one authoritative state accessible to a collaborating team.
D: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 make one authoritative state accessible to a collaborating team. The distinction matters here: using that mechanism to identify which remote object Terraform currently manages for a resource block would still leave the objective to make one authoritative state accessible to a collaborating team unmet.
E: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 make one authoritative state accessible to a collaborating team. It may support a related workflow, but the question specifically requires the mechanism for make one authoritative state accessible to a collaborating team rather than explain why plans may propose correcting unapproved changes.
Question 99
A reviewer has to approve a two-part design: identify the registry namespace and provider type to install; additionally, download and initialize missing required providers. Which option pairs the correct mechanisms?
- Declare provider source under
required_providers + Use TF_PLUGIN_CACHE_DIR for shared package caching
- Inspect selected providers with
terraform providers + Constrain required_version for Terraform Core
- Understand checksums in the lock file + Run
terraform init to install plugins
- Declare provider source under
required_providers + Run terraform init to install plugins
Explanation
Correct Answer
D:For the first criterion, the source address identifies the plugin distribution; a local short name in HCL is only an alias within that module; terraform must resolve provider requirements during initialization; this behavior should be assessed against the concrete need to identify the registry namespace and provider type to install and download and initialize missing required providers; this directly addresses the need to identify the registry namespace and provider type to install. For the separate second criterion, 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 identify the registry namespace and provider type to install and download and initialize missing required providers; this fulfills the need to download and initialize missing required providers. Together they cover the independent tasks of identify the registry namespace and provider type to install and download and initialize missing required providers without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure meets the requirement to identify the registry namespace and provider type to install, but its partner serves a different role: 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 identify the registry namespace and provider type to install and download and initialize missing required providers. That second component is designed to avoid repeatedly downloading the same provider binaries on a build host, so the still-missing criterion is to download and initialize missing required providers, while the first criterion remains identify the registry namespace and provider type to install.
B:The first measure is intended to see the provider requirements for the root and child modules: The command reports the provider dependency tree and can aid source/version troubleshooting; it does not rewrite constraints or upgrade plugin packages; this behavior should be assessed against the concrete need to identify the registry namespace and provider type to install and download and initialize missing required providers. The second measure is intended to specify which Terraform CLI versions may interpret this configuration: The top-level Terraform version constraint concerns the CLI executable, not a provider plugin; provider requirements belong in required_providers; this behavior should be assessed against the concrete need to identify the registry namespace and provider type to install and download and initialize missing required providers. Neither is the directly designated method for the separate goals of identify the registry namespace and provider type to install and download and initialize missing required providers in this review.
C:The second measure does meet the download and initialize missing required providers requirement, but the first is designed for another concern: 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 identify the registry namespace and provider type to install and download and initialize missing required providers. That first component is designed to verify installed provider packages against trusted recorded hashes, which does not accomplish the requested task to identify the registry namespace and provider type to install, even though the other measure satisfies download and initialize missing required providers.
Question 100
In a planned migration, the requested result is to ensure dependencies are installed during initialization. What should the engineer select?
- Avoid assuming providers install automatically at apply
- Recognize provider source addresses
- Review provider documentation for sensitive attributes
- Handle provider-specific constraints
Explanation
Correct Answer
A: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 ensure dependencies are installed during initialization. This directly supports the task to ensure dependencies are installed during initialization during a deployment checklist.
Incorrect Answers
B: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 ensure dependencies are installed during initialization. It may support a related workflow, but the question specifically requires the mechanism for ensure dependencies are installed during initialization rather than distinguish a local provider name from its registry namespace.
C: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 ensure dependencies are installed during initialization. The stated requirement is to ensure dependencies are installed during initialization, not to avoid assuming ordinary resource arguments hide secrets from state; this alternative addresses a different control or phase.
D: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 ensure dependencies are installed during initialization. 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 ensure dependencies are installed during initialization.