Question 160
A build worker must initialize a reproducible working directory. A reviewer must determine how to discard the previously remembered backend configuration without migrating state. Which action is the appropriate choice?
- Use
terraform init -reconfigure
- Use
terraform init -migrate-state
- Use
terraform init -upgrade
- Inspect
.terraform/ as generated local metadata
Explanation
Correct Answer
A:Reconfiguration initializes the directory against the new backend settings; it is not a replacement for migrating state that must be preserved; this behavior should be assessed against the concrete need to discard the previously remembered backend configuration without migrating state. This directly supports the task to discard the previously remembered backend configuration without migrating state during a staged rollout.
Incorrect Answers
B:Migration attempts to move state into the newly configured backend; backups and confirmation are important before switching active state locations; this behavior should be assessed against the concrete need to discard the previously remembered backend configuration without migrating state. The stated requirement is to discard the previously remembered backend configuration without migrating state, not to copy existing state when changing storage backends; this alternative addresses a different control or phase.
C:Upgrade requests reconsideration of versions within declared constraints; it changes dependency selections, not infrastructure objects by itself; this behavior should be assessed against the concrete need to discard the previously remembered backend configuration without migrating state. That can be useful when the aim is to reselect newer eligible provider and module packages, but it does not directly deliver the requested ability to discard the previously remembered backend configuration without migrating state.
D:The directory can hold installed modules, provider metadata, and backend configuration; it should normally be excluded from Git and may contain sensitive settings; this behavior should be assessed against the concrete need to discard the previously remembered backend configuration without migrating state. The distinction matters here: using that mechanism to recognize initialization artifacts rather than versioned source would still leave the objective to discard the previously remembered backend configuration without migrating state unmet.
Question 161
The immediate Terraform task is to detect proposed infrastructure differences as well as dynamic provider evaluations. Which method handles that task most directly?
- Use
terraform fmt -check for formatting enforcement
- Use
terraform plan for state-dependent checking
- Run
terraform validate after init
- Recognize provider schema validation
Explanation
Correct Answer
B:Plan evaluates the current infrastructure context and produces intended actions; validate cannot establish whether remote permissions and quotas will permit those actions; this behavior should be assessed against the concrete need to detect proposed infrastructure differences as well as dynamic provider evaluations. This directly supports the task to detect proposed infrastructure differences as well as dynamic provider evaluations during a configuration change.
Incorrect Answers
A:fmt -check exits nonzero when files need canonical formatting; it is a style check, not a replacement for Terraform semantic validation; this behavior should be assessed against the concrete need to detect proposed infrastructure differences as well as dynamic provider evaluations. The distinction matters here: using that mechanism to detect code style deviations without rewriting files would still leave the objective to detect proposed infrastructure differences as well as dynamic provider evaluations unmet.
C:Validate checks syntax, types, and provider-schema rules without generating a cloud execution plan; initialization is normally required so schemas and modules are present; this behavior should be assessed against the concrete need to detect proposed infrastructure differences as well as dynamic provider evaluations. The stated requirement is to detect proposed infrastructure differences as well as dynamic provider evaluations, not to check configuration consistency independently of managed infrastructure operations; this alternative addresses a different control or phase.
D:Provider plugins supply schemas used for structural checking; passing validation does not mean the remote API will accept every eventual requested operation; this behavior should be assessed against the concrete need to detect proposed infrastructure differences as well as dynamic provider evaluations. That can be useful when the aim is to detect unsupported resource arguments or incorrect types, but it does not directly deliver the requested ability to detect proposed infrastructure differences as well as dynamic provider evaluations.
Question 162
A Terraform rollout has separate acceptance criteria: omit the usual state refresh while creating an ordinary plan and recognize a planned destroy-and-create operation rather than an in-place edit. Which combined approach directly satisfies the two criteria?
- Use
terraform plan -var-file=env.tfvars + Read -/+ as replacement intent
- Use
terraform plan -refresh=false carefully + Understand a (known after apply) value
- Use
terraform plan -refresh=false carefully + Read -/+ as replacement intent
- Use
terraform plan -replace=ADDRESS + Use terraform plan -out=tfplan
Explanation
Correct Answer
C:For the first criterion, skipping remote refresh can produce an inaccurate plan when out-of-band changes have occurred; it is not a drift-detection strategy; this behavior should be assessed against the concrete need to omit the usual state refresh while creating an ordinary plan and recognize a planned destroy-and-create operation rather than an in-place edit; this directly addresses the need to omit the usual state refresh while creating an ordinary plan. For the separate second criterion, some argument changes cannot be updated remotely and require a new object; replacement can have downtime implications unless ordering or architecture mitigates it; this behavior should be assessed against the concrete need to omit the usual state refresh while creating an ordinary plan and recognize a planned destroy-and-create operation rather than an in-place edit; this fulfills the need to recognize a planned destroy-and-create operation rather than an in-place edit. Together they cover the independent tasks of omit the usual state refresh while creating an ordinary plan and recognize a planned destroy-and-create operation rather than an in-place edit without exchanging the responsibilities of these features.
Incorrect Answers
A:The second measure does meet the recognize a planned destroy-and-create operation rather than an in-place edit requirement, but the first is designed for another concern: An explicitly selected tfvars file feeds input values into that run; a .tfvars file is not a provider dependency lock; this behavior should be assessed against the concrete need to omit the usual state refresh while creating an ordinary plan and recognize a planned destroy-and-create operation rather than an in-place edit. That first component is designed to load an explicit environment input file, which does not accomplish the requested task to omit the usual state refresh while creating an ordinary plan, even though the other measure satisfies recognize a planned destroy-and-create operation rather than an in-place edit.
B:The first measure meets the requirement to omit the usual state refresh while creating an ordinary plan, but its partner serves a different role: Computed provider attributes may be unknown until resource creation; terraform carries unknown values through dependent expressions rather than fabricating them; this behavior should be assessed against the concrete need to omit the usual state refresh while creating an ordinary plan and recognize a planned destroy-and-create operation rather than an in-place edit. That second component is designed to interpret an attribute whose value is not available during planning, so the still-missing criterion is to recognize a planned destroy-and-create operation rather than an in-place edit, while the first criterion remains omit the usual state refresh while creating an ordinary plan.
D:The first measure is intended to request replacement of a particular managed instance: The flag adds a replacement instruction to planning for an addressed resource; it is preferable to legacy manual taint workflows for deliberate replacement; this behavior should be assessed against the concrete need to omit the usual state refresh while creating an ordinary plan and recognize a planned destroy-and-create operation rather than an in-place edit. The second measure is intended to save a plan for later explicit approval and application: A saved plan captures selections and inputs for later use; it may include secrets and backend settings, so the artifact requires access controls; this behavior should be assessed against the concrete need to omit the usual state refresh while creating an ordinary plan and recognize a planned destroy-and-create operation rather than an in-place edit. Neither is the directly designated method for the separate goals of omit the usual state refresh while creating an ordinary plan and recognize a planned destroy-and-create operation rather than an in-place edit in this review.
Question 163
A deployment script must avoid unintended interactive prompts. The team must both prevent two runs from racing to write incompatible snapshots and avoid leaking provider settings and input values through artifacts. Which paired choice implements those distinct goals?
- Use
terraform apply -input=false in unattended execution + Run a new plan after unexpected apply behavior
- Run
terraform apply to execute current configuration + Keep sensitive saved plans secure
- Avoid concurrent applies against shared state + Keep sensitive saved plans secure
- Avoid concurrent applies against shared state + Run
terraform apply tfplan for an approved saved plan
Explanation
Correct Answer
C:For the first criterion, a locking-capable backend serializes state modifications; even with a lock, proper approvals and pipeline serialization remain important; this behavior should be assessed against the concrete need to prevent two runs from racing to write incompatible snapshots and avoid leaking provider settings and input values through artifacts; this directly addresses the need to prevent two runs from racing to write incompatible snapshots. For the separate second criterion, plan files are not sanitized public reports; their embedded values and backend details require protective storage and restricted access; this behavior should be assessed against the concrete need to prevent two runs from racing to write incompatible snapshots and avoid leaking provider settings and input values through artifacts; this fulfills the need to avoid leaking provider settings and input values through artifacts. Together they cover the independent tasks of prevent two runs from racing to write incompatible snapshots and avoid leaking provider settings and input values through artifacts without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure is intended to prevent the run from waiting for interactive variable input: The run fails if required input cannot be obtained in noninteractive mode; this avoids jobs hanging on missing variables; this behavior should be assessed against the concrete need to prevent two runs from racing to write incompatible snapshots and avoid leaking provider settings and input values through artifacts. The second measure is intended to reconcile the state and observed API results before taking further action: A subsequent plan refreshes tracked objects and identifies outstanding changes; blindly rerunning unrelated commands may hide the failure's scope; this behavior should be assessed against the concrete need to prevent two runs from racing to write incompatible snapshots and avoid leaking provider settings and input values through artifacts. Neither is the directly designated method for the separate goals of prevent two runs from racing to write incompatible snapshots and avoid leaking provider settings and input values through artifacts in this review.
B:The second measure does meet the avoid leaking provider settings and input values through artifacts requirement, but the first is designed for another concern: Without a saved plan argument, apply creates a plan and normally requests approval before performing it; provider APIs then implement the proposed operations; this behavior should be assessed against the concrete need to prevent two runs from racing to write incompatible snapshots and avoid leaking provider settings and input values through artifacts. That first component is designed to generate and carry out the necessary actions for managed infrastructure, which does not accomplish the requested task to prevent two runs from racing to write incompatible snapshots, even though the other measure satisfies avoid leaking provider settings and input values through artifacts.
D:The first measure meets the requirement to prevent two runs from racing to write incompatible snapshots, but its partner serves a different role: Applying a saved plan uses its captured decisions and state assumptions; a changed state can invalidate it instead of silently applying a different plan; this behavior should be assessed against the concrete need to prevent two runs from racing to write incompatible snapshots and avoid leaking provider settings and input values through artifacts. That second component is designed to execute the exact plan artifact rather than replan with new input values, so the still-missing criterion is to avoid leaking provider settings and input values through artifacts, while the first criterion remains prevent two runs from racing to write incompatible snapshots.
Question 164
A retired lab environment must be removed. Two independent changes are requested: first, limit a teardown to a selected resource or dependency subset; second, stop Terraform management while leaving a real object intact. Which pair of measures fulfills both?
- Use
terraform destroy -auto-approve only with safeguards + Remove a resource from state without destroying it
- Use
terraform destroy -target=ADDRESS cautiously + Check the selected workspace before destroying
- Understand cloud deletion protections + Use
terraform destroy for a managed deployment
- Inspect dependencies during teardown + Remove a resource from state without destroying it
- Use
terraform destroy -target=ADDRESS cautiously + Remove a resource from state without destroying it
Explanation
Correct Answer
E:For the first criterion, targeting is intended for exceptional recovery, not routine architecture management; the rest of the state can remain dependent on objects that were removed; this behavior should be assessed against the concrete need to limit a teardown to a selected resource or dependency subset and stop Terraform management while leaving a real object intact; this directly addresses the need to limit a teardown to a selected resource or dependency subset. For the separate second criterion, terraform state rm or a supported removed block can forget an object; it is different from instructing a provider to delete infrastructure; this behavior should be assessed against the concrete need to limit a teardown to a selected resource or dependency subset and stop Terraform management while leaving a real object intact; this fulfills the need to stop Terraform management while leaving a real object intact. Together they cover the independent tasks of limit a teardown to a selected resource or dependency subset and stop Terraform management while leaving a real object intact without exchanging the responsibilities of these features.
Incorrect Answers
A:The second measure does meet the stop Terraform management while leaving a real object intact requirement, but the first is designed for another concern: Automatic approval suppresses the prompt but not provider deletion restrictions or external dependencies; the operation remains destructive; this behavior should be assessed against the concrete need to limit a teardown to a selected resource or dependency subset and stop Terraform management while leaving a real object intact. That first component is designed to bypass interactive confirmation for a controlled teardown job, which does not accomplish the requested task to limit a teardown to a selected resource or dependency subset, even though the other measure satisfies stop Terraform management while leaving a real object intact.
B:The first measure meets the requirement to limit a teardown to a selected resource or dependency subset, but its partner serves a different role: Terraform operates on the selected state and current configuration; similar resource names in separate states can refer to entirely different real objects; this behavior should be assessed against the concrete need to limit a teardown to a selected resource or dependency subset and stop Terraform management while leaving a real object intact. That second component is designed to avoid deleting resources belonging to a different environment, so the still-missing criterion is to stop Terraform management while leaving a real object intact, while the first criterion remains limit a teardown to a selected resource or dependency subset.
C:The first measure is intended to distinguish provider API refusal from Terraform syntax issues: Some services reject deletes while protection, retention, or dependencies remain; changing the HCL declaration alone does not override service-side restrictions; this behavior should be assessed against the concrete need to limit a teardown to a selected resource or dependency subset and stop Terraform management while leaving a real object intact. The second measure is intended to plan and delete resources tracked by the current configuration and state: Destroy requests deletion of Terraform-managed objects in the selected state; it does not search all cloud resources or remove unmanaged objects; this behavior should be assessed against the concrete need to limit a teardown to a selected resource or dependency subset and stop Terraform management while leaving a real object intact. Neither is the directly designated method for the separate goals of limit a teardown to a selected resource or dependency subset and stop Terraform management while leaving a real object intact in this review.
D:The second measure does meet the stop Terraform management while leaving a real object intact requirement, but the first is designed for another concern: Terraform reverses dependency relationships where necessary to delete objects safely; explicit and implicit graph edges influence safe order; this behavior should be assessed against the concrete need to limit a teardown to a selected resource or dependency subset and stop Terraform management while leaving a real object intact. That first component is designed to understand why child objects may be destroyed before prerequisites, which does not accomplish the requested task to limit a teardown to a selected resource or dependency subset, even though the other measure satisfies stop Terraform management while leaving a real object intact.
Question 165
A platform pipeline needs deterministic style checks. A reviewer must determine how to avoid expecting style normalization to fetch plugin binaries. Which action is the appropriate choice?
- Run
terraform fmt in the working directory
- Run
terraform fmt -diff
- Apply style checks to module directories
- Separate
fmt from provider installation
- Use standard indentation and alignment from
fmt
Explanation
Correct Answer
D:Formatting reads local HCL and does not initialize backends or download provider packages; dependency preparation remains the role of init; this behavior should be assessed against the concrete need to avoid expecting style normalization to fetch plugin binaries. This directly supports the task to avoid expecting style normalization to fetch plugin binaries during a cross-team handoff.
Incorrect Answers
A:The formatter adjusts layout and spacing according to Terraform conventions; it does not modify remote infrastructure or update state; this behavior should be assessed against the concrete need to avoid expecting style normalization to fetch plugin binaries. The distinction matters here: using that mechanism to rewrite Terraform files into canonical HCL style would still leave the objective to avoid expecting style normalization to fetch plugin binaries unmet.
B:Diff mode shows the before-and-after formatting changes; it cannot indicate whether a proposed resource change is safe; this behavior should be assessed against the concrete need to avoid expecting style normalization to fetch plugin binaries. It may support a related workflow, but the question specifically requires the mechanism for avoid expecting style normalization to fetch plugin binaries rather than display the textual adjustments a formatter would make.
C:Module source code is Terraform configuration and can be formatted with the same tool; formatting never pins which module release is used; this behavior should be assessed against the concrete need to avoid expecting style normalization to fetch plugin binaries. The stated requirement is to avoid expecting style normalization to fetch plugin binaries, not to enforce a consistent codebase without changing module behavior; this alternative addresses a different control or phase.
E:Canonical layout gives team members predictable formatting; hand-crafted alignment rules are not necessary to make Terraform parse HCL correctly; this behavior should be assessed against the concrete need to avoid expecting style normalization to fetch plugin binaries. The distinction matters here: using that mechanism to reduce noisy diff conflicts across contributors would still leave the objective to avoid expecting style normalization to fetch plugin binaries unmet.
Question 166
An approval board needs a safe order for infrastructure changes. A reviewer must determine how to identify structural issues early in a workflow. Which action is the appropriate choice?
- Review results with a follow-up plan
- Apply reviewed changes with
terraform apply
- Avoid applying an outdated reviewed plan
- Validate configuration before requesting a plan
Explanation
Correct Answer
D:Validation checks the HCL configuration against available schemas; it is useful in CI but cannot replace a plan based on actual state and provider data; this behavior should be assessed against the concrete need to identify structural issues early in a workflow. This directly supports the task to identify structural issues early in a workflow during a staged rollout.
Incorrect Answers
A:When inputs and real infrastructure are unchanged, a later normal plan generally shows no changes; a follow-up plan can also detect external drift; this behavior should be assessed against the concrete need to identify structural issues early in a workflow. That can be useful when the aim is to verify convergence after a completed deployment, but it does not directly deliver the requested ability to identify structural issues early in a workflow.
B:Apply coordinates provider operations and updates state after effects are known; it needs valid authentication and can still fail if the API rejects an operation; this behavior should be assessed against the concrete need to identify structural issues early in a workflow. The distinction matters here: using that mechanism to execute the actions Terraform has selected for managed infrastructure would still leave the objective to identify structural issues early in a workflow unmet.
C:Saved plans encode assumptions about the state snapshot and inputs; if the state changes, applying a stale plan may be rejected rather than silently reinterpreted; this behavior should be assessed against the concrete need to identify structural issues early in a workflow. It may support a related workflow, but the question specifically requires the mechanism for identify structural issues early in a workflow rather than ensure the approved actions still correspond to current state.
Question 167
The immediate Terraform task is to enforce a committed provider selection without lockfile edits. Which method handles that task most directly?
- Use
terraform init -reconfigure
- Use
terraform init -lockfile=readonly
- Use
terraform init -get=false
- Use
terraform init -upgrade
Explanation
Correct Answer
B:Read-only dependency locking catches selection drift in automated builds; the lock file applies to providers rather than pinning arbitrary local module directories; this behavior should be assessed against the concrete need to enforce a committed provider selection without lockfile edits. This directly supports the task to enforce a committed provider selection without lockfile edits during a configuration change.
Incorrect Answers
A:Reconfiguration initializes the directory against the new backend settings; it is not a replacement for migrating state that must be preserved; this behavior should be assessed against the concrete need to enforce a committed provider selection without lockfile edits. The stated requirement is to enforce a committed provider selection without lockfile edits, not to discard the previously remembered backend configuration without migrating state; this alternative addresses a different control or phase.
C:This option avoids module download/update during initialization; it is appropriate only when required modules are already available; this behavior should be assessed against the concrete need to enforce a committed provider selection without lockfile edits. The distinction matters here: using that mechanism to skip installing child modules in a prepared directory would still leave the objective to enforce a committed provider selection without lockfile edits unmet.
D:Upgrade requests reconsideration of versions within declared constraints; it changes dependency selections, not infrastructure objects by itself; this behavior should be assessed against the concrete need to enforce a committed provider selection without lockfile edits. It may support a related workflow, but the question specifically requires the mechanism for enforce a committed provider selection without lockfile edits rather than reselect newer eligible provider and module packages.
Question 168
A Terraform rollout has separate acceptance criteria: catch references to undeclared blocks and invalid attributes where detectable and reject invalid user-supplied values with a targeted message. Which combined approach directly satisfies the two criteria?
- Run
terraform validate after init + Use terraform plan for state-dependent checking
- Check expression references for validity + Interpret a clean validate as limited assurance
- Check expression references for validity + Use variable
validation for input contracts
- Use
terraform fmt -check for formatting enforcement + Use variable validation for input contracts
Explanation
Correct Answer
C:For the first criterion, terraform validates the structure of expressions against known configuration objects; values only resolved by providers may remain unknown until later phases; this behavior should be assessed against the concrete need to catch references to undeclared blocks and invalid attributes where detectable and reject invalid user-supplied values with a targeted message; this directly addresses the need to catch references to undeclared blocks and invalid attributes where detectable. For the separate second criterion, the validation rule belongs to the variable declaration and returns a Boolean; it is distinct from the CLI's whole-configuration validation subcommand; this behavior should be assessed against the concrete need to catch references to undeclared blocks and invalid attributes where detectable and reject invalid user-supplied values with a targeted message; this fulfills the need to reject invalid user-supplied values with a targeted message. Together they cover the independent tasks of catch references to undeclared blocks and invalid attributes where detectable and reject invalid user-supplied values with a targeted message without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure is intended to check configuration consistency independently of managed infrastructure operations: Validate checks syntax, types, and provider-schema rules without generating a cloud execution plan; initialization is normally required so schemas and modules are present; this behavior should be assessed against the concrete need to catch references to undeclared blocks and invalid attributes where detectable and reject invalid user-supplied values with a targeted message. The second measure is intended to detect proposed infrastructure differences as well as dynamic provider evaluations: Plan evaluates the current infrastructure context and produces intended actions; validate cannot establish whether remote permissions and quotas will permit those actions; this behavior should be assessed against the concrete need to catch references to undeclared blocks and invalid attributes where detectable and reject invalid user-supplied values with a targeted message. Neither is the directly designated method for the separate goals of catch references to undeclared blocks and invalid attributes where detectable and reject invalid user-supplied values with a targeted message in this review.
B:The first measure meets the requirement to catch references to undeclared blocks and invalid attributes where detectable, but its partner serves a different role: Provider API authorization, remote conflicts, and real infrastructure drift can still produce failures; validation checks supported configuration structure rather than deployment success; this behavior should be assessed against the concrete need to catch references to undeclared blocks and invalid attributes where detectable and reject invalid user-supplied values with a targeted message. That second component is designed to avoid inferring a successful future apply from successful static checks, so the still-missing criterion is to reject invalid user-supplied values with a targeted message, while the first criterion remains catch references to undeclared blocks and invalid attributes where detectable.
D:The second measure does meet the reject invalid user-supplied values with a targeted message requirement, but the first is designed for another concern: fmt -check exits nonzero when files need canonical formatting; it is a style check, not a replacement for Terraform semantic validation; this behavior should be assessed against the concrete need to catch references to undeclared blocks and invalid attributes where detectable and reject invalid user-supplied values with a targeted message. That first component is designed to detect code style deviations without rewriting files, which does not accomplish the requested task to catch references to undeclared blocks and invalid attributes where detectable, even though the other measure satisfies reject invalid user-supplied values with a targeted message.
Question 169
An engineer needs to distinguish clean plans from plans with proposed changes in CI as part of an automated release. Which option is the best fit?
- Use
terraform plan -detailed-exitcode
- Use
terraform plan -var-file=env.tfvars
- Run
terraform plan without applying
- Use
terraform plan -var='name=value'
Explanation
Correct Answer
A:The option uses exit code 0 for no differences, 2 for differences, and 1 for errors; a nonzero value is not always an execution failure; this behavior should be assessed against the concrete need to distinguish clean plans from plans with proposed changes in CI. This directly supports the task to distinguish clean plans from plans with proposed changes in CI during an infrastructure audit.
Incorrect Answers
B:An explicitly selected tfvars file feeds input values into that run; a .tfvars file is not a provider dependency lock; this behavior should be assessed against the concrete need to distinguish clean plans from plans with proposed changes in CI. It may support a related workflow, but the question specifically requires the mechanism for distinguish clean plans from plans with proposed changes in CI rather than load an explicit environment input file.
C:Plan evaluates dependencies and current state and reports create/update/replace/delete intentions; it normally performs no desired resource changes; this behavior should be assessed against the concrete need to distinguish clean plans from plans with proposed changes in CI. The stated requirement is to distinguish clean plans from plans with proposed changes in CI, not to preview the actions needed to reconcile the declared configuration; this alternative addresses a different control or phase.
D:CLI variable arguments supply run-specific values; they do not permanently modify the variable declaration or backend configuration; this behavior should be assessed against the concrete need to distinguish clean plans from plans with proposed changes in CI. That can be useful when the aim is to override an input variable for one planned run, but it does not directly deliver the requested ability to distinguish clean plans from plans with proposed changes in CI.
Question 170
An approved Terraform change must be executed safely. Two independent changes are requested: first, supply planned environment-specific input values in a direct apply; second, understand why an unsuccessful apply may still have changed some resources. Which pair of measures fulfills both?
- Use
terraform apply -var-file=prod.tfvars + Check apply output for partial failure
- Use
terraform apply -replace=ADDRESS for an intentional rebuild + Check apply output for partial failure
- Run
terraform apply tfplan for an approved saved plan + Keep sensitive saved plans secure
- Use
terraform apply -var-file=prod.tfvars + Use terraform apply -input=false in unattended execution
Explanation
Correct Answer
A:For the first criterion, variable files set input variables for that run; their contents do not overwrite provider schemas or module source code; this behavior should be assessed against the concrete need to supply planned environment-specific input values in a direct apply and understand why an unsuccessful apply may still have changed some resources; this directly addresses the need to supply planned environment-specific input values in a direct apply. For the separate second criterion, terraform may have completed earlier provider operations before a later step fails; state can record successful actions, so investigate the next plan rather than assuming a full rollback; this behavior should be assessed against the concrete need to supply planned environment-specific input values in a direct apply and understand why an unsuccessful apply may still have changed some resources; this fulfills the need to understand why an unsuccessful apply may still have changed some resources. Together they cover the independent tasks of supply planned environment-specific input values in a direct apply and understand why an unsuccessful apply may still have changed some resources without exchanging the responsibilities of these features.
Incorrect Answers
B:The second measure does meet the understand why an unsuccessful apply may still have changed some resources requirement, but the first is designed for another concern: The CLI adds a replacement request to the plan it creates; a saved plan should instead be prepared with the replacement request at planning time; this behavior should be assessed against the concrete need to supply planned environment-specific input values in a direct apply and understand why an unsuccessful apply may still have changed some resources. That first component is designed to force a targeted resource to be replaced during an ordinary apply, which does not accomplish the requested task to supply planned environment-specific input values in a direct apply, even though the other measure satisfies understand why an unsuccessful apply may still have changed some resources.
C:The first measure is intended to execute the exact plan artifact rather than replan with new input values: Applying a saved plan uses its captured decisions and state assumptions; a changed state can invalidate it instead of silently applying a different plan; this behavior should be assessed against the concrete need to supply planned environment-specific input values in a direct apply and understand why an unsuccessful apply may still have changed some resources. The second measure is intended to avoid leaking provider settings and input values through artifacts: Plan files are not sanitized public reports; their embedded values and backend details require protective storage and restricted access; this behavior should be assessed against the concrete need to supply planned environment-specific input values in a direct apply and understand why an unsuccessful apply may still have changed some resources. Neither is the directly designated method for the separate goals of supply planned environment-specific input values in a direct apply and understand why an unsuccessful apply may still have changed some resources in this review.
D:The first measure meets the requirement to supply planned environment-specific input values in a direct apply, but its partner serves a different role: The run fails if required input cannot be obtained in noninteractive mode; this avoids jobs hanging on missing variables; this behavior should be assessed against the concrete need to supply planned environment-specific input values in a direct apply and understand why an unsuccessful apply may still have changed some resources. That second component is designed to prevent the run from waiting for interactive variable input, so the still-missing criterion is to understand why an unsuccessful apply may still have changed some resources, while the first criterion remains supply planned environment-specific input values in a direct apply.