HashiCorp Terraform Associate 004 Practice Test 13
Question 120
During an isolated staging rehearsal of the Terraform workflow, the following condition occurs: A Terraform configuration refers to var.enviroment with a typo although only variable environment was declared, and teammates hope formatting will catch it. The operator must obtain auditable evidence before touching production resources. Which Terraform configuration or workflow change most directly corrects the described issue?
- Decide whether to restore declared configuration or intentionally adopt the outside value, then plan under the chosen ownership policy.
- Run terraform init with an appropriate migration or reconfiguration option after ensuring correct target state and backups.
- Use terraform validate to identify the invalid reference, correct the spelling, and rerun validation before planning.
- Use terraform validate to catch configuration errors and separately run plan or controlled provider checks to assess remote feasibility.
Explanation
Correct Answer
C:Use terraform validate to identify the invalid reference, correct the spelling, and rerun validation before planning. Formatting changes whitespace and indentation; static validation identifies invalid references and configuration structure. Confirm the cause with: Inspect Terraform diagnostic output for undeclared input references and compare declared variable names to expressions. A concrete acceptance test is: Validation passes with the declared variable name and no longer reports the nonexistent symbol reference. This matters here because a Terraform configuration refers to var.enviroment with a typo although only variable environment was declared, and….
Incorrect Answers
A:Decide whether to restore declared configuration or intentionally adopt the outside value, then plan under the chosen ownership policy. This could address plan versus real infrastructure drift, but it does not correct the indicated terraform validate catches undeclared reference mechanism. The relevant fix is: Use terraform validate to identify the invalid reference, correct the spelling, and rerun validation before planning. This matters here because a Terraform configuration refers to var.enviroment with a typo although only variable environment was declared, and….
B:Run terraform init with an appropriate migration or reconfiguration option after ensuring correct target state and backups. This could address reinitializing after backend configuration change, but it does not correct the indicated terraform validate catches undeclared reference mechanism. The relevant fix is: Use terraform validate to identify the invalid reference, correct the spelling, and rerun validation before planning.
D:Use terraform validate to catch configuration errors and separately run plan or controlled provider checks to assess remote feasibility. This could address terraform validate versus cloud permission testing, but it does not correct the indicated terraform validate catches undeclared reference mechanism. The relevant fix is: Use terraform validate to identify the invalid reference, correct the spelling, and rerun validation before planning. This matters here because a Terraform configuration refers to var.enviroment with a typo although only variable environment was declared, and….
Question 121
While migrating a manually maintained development environment into reviewed Terraform configuration, the following condition occurs: An operations group records a sequence of manual console clicks to provision identical test environments, but the resulting infrastructure differs between operators. The team must establish a reproducible and auditable infrastructure change. Which outcome most directly validates the intended fix?
- An unanticipated deletion or replacement is identified and blocked before a privileged apply can execute it.
- An auditor can identify the approved commit and plan that caused a deliberate infrastructure capacity change.
- A clean environment can be reconstructed from the same reviewed configuration with repeatable managed resource attributes.
- A series of Terraform plans remains stable after independent automation without oscillating policy settings between tools.
Explanation
Correct Answer
C:A clean environment can be reconstructed from the same reviewed configuration with repeatable managed resource attributes. Infrastructure as code declares a desired resource graph; repeated manual commands are not a reliable description of end state. It tests the correction: Express the intended resources in Terraform configuration and review its generated plan before applying a consistent desired state.
Incorrect Answers
A:An unanticipated deletion or replacement is identified and blocked before a privileged apply can execute it. This might validate terraform plan review as change safety barrier, but it does not prove that declarative desired state versus imperative console runbook was resolved. Confirm instead: A clean environment can be reconstructed from the same reviewed configuration with repeatable managed resource attributes.
B:An auditor can identify the approved commit and plan that caused a deliberate infrastructure capacity change. This might validate version-controlled iac change auditing, but it does not prove that declarative desired state versus imperative console runbook was resolved. Confirm instead: A clean environment can be reconstructed from the same reviewed configuration with repeatable managed resource attributes.
D:A series of Terraform plans remains stable after independent automation without oscillating policy settings between tools. This might validate terraform resource ownership boundary, but it does not prove that declarative desired state versus imperative console runbook was resolved. Confirm instead: A clean environment can be reconstructed from the same reviewed configuration with repeatable managed resource attributes.
Question 122
As the deployment team prepares a reviewed Terraform CLI change, the following condition occurs: A test team runs terraform destroy from a shared state backend believing it removes only the temporary virtual machine they recently created. The change must preserve the distinction between previewing and modifying infrastructure. Which TWO complementary choices identify the cause and implement the appropriate fix? Select TWO.
- Use a dedicated isolated workspace/state and inspect terraform plan -destroy before removing its tracked infrastructure.
- Inspect all resource addresses present in the selected workspace state and the destroy plan's complete deletion scope.
- Inspect the old backend metadata, new backend block, and whether a state migration has been explicitly reviewed.
- Use an appropriate removed block with destroy = false or a controlled state rm workflow while preserving the remote object.
- Execute terraform init in the root configuration directory and resolve backend or provider setup failures before planning.
Explanation
Correct Answers
A:Use a dedicated isolated workspace/state and inspect terraform plan -destroy before removing its tracked infrastructure. Terraform destroy targets the managed resources recorded in the selected state, not only the objects recently added by one operator. Confirm the cause with: Inspect all resource addresses present in the selected workspace state and the destroy plan's complete deletion scope. A concrete acceptance test is: Only the intended disposable environment's managed objects are removed and shared production resources remain in separate state. This forms one element of the required two-step diagnosis and correction.
B:Inspect all resource addresses present in the selected workspace state and the destroy plan's complete deletion scope. Terraform destroy targets the managed resources recorded in the selected state, not only the objects recently added by one operator. A justified correction is: Use a dedicated isolated workspace/state and inspect terraform plan -destroy before removing its tracked infrastructure. This forms one element of the required two-step diagnosis and correction.
Incorrect Answers
C:Inspect the old backend metadata, new backend block, and whether a state migration has been explicitly reviewed. This relates to reinitializing after backend configuration change rather than the matching diagnosis-and-remediation pair required here. Check: Inspect all resource addresses present in the selected workspace state and the destroy plan's complete deletion scope. Then change: Use a dedicated isolated workspace/state and inspect terraform plan -destroy before removing its tracked infrastructure.
D:Use an appropriate removed block with destroy = false or a controlled state rm workflow while preserving the remote object. This relates to selective cleanup without destroying retained object rather than the matching diagnosis-and-remediation pair required here. Check: Inspect all resource addresses present in the selected workspace state and the destroy plan's complete deletion scope. Then change: Use a dedicated isolated workspace/state and inspect terraform plan -destroy before removing its tracked infrastructure.
E:Execute terraform init in the root configuration directory and resolve backend or provider setup failures before planning. This relates to terraform init backend and provider preparation rather than the matching diagnosis-and-remediation pair required here. Check: Inspect all resource addresses present in the selected workspace state and the destroy plan's complete deletion scope. Then change: Use a dedicated isolated workspace/state and inspect terraform plan -destroy before removing its tracked infrastructure.
Question 123
During a governed HCP Terraform workspace rollout, the following condition occurs: A platform team expects HCP Terraform to plan when its default branch changes, but the workspace is CLI-driven and no repository integration exists. The organization must retain auditable authorization for runs and state. Select TWO: the decisive first check and the change that directly addresses the problem.
- Attach supported Sentinel or OPA policies to the appropriate HCP Terraform workspaces with a suitable mandatory enforcement level.
- Inspect workspace workflow configuration, VCS repository association, branch selection and recent run triggers.
- Configure an authorized VCS-driven workspace with the appropriate repository and branch and review the plan/apply settings.
- Inspect current HCP project assignments, workspace ownership patterns, and project/team permission boundaries.
- Connect the configuration to the appropriate HCP Terraform workspace and select a governed remote execution workflow.
Explanation
Correct Answers
B:Inspect workspace workflow configuration, VCS repository association, branch selection and recent run triggers. VCS-driven HCP Terraform workflows respond to repository changes when the workspace is explicitly integrated with that source. A justified correction is: Configure an authorized VCS-driven workspace with the appropriate repository and branch and review the plan/apply settings. This forms one element of the required two-step diagnosis and correction.
C:Configure an authorized VCS-driven workspace with the appropriate repository and branch and review the plan/apply settings. VCS-driven HCP Terraform workflows respond to repository changes when the workspace is explicitly integrated with that source. Confirm the cause with: Inspect workspace workflow configuration, VCS repository association, branch selection and recent run triggers. A concrete acceptance test is: An approved commit creates the intended Terraform plan run under the selected workspace without laptop-only execution. This forms one element of the required two-step diagnosis and correction.
Incorrect Answers
A:Attach supported Sentinel or OPA policies to the appropriate HCP Terraform workspaces with a suitable mandatory enforcement level. This relates to hcp terraform policy enforcement governance rather than the matching diagnosis-and-remediation pair required here. Check: Inspect workspace workflow configuration, VCS repository association, branch selection and recent run triggers. Then change: Configure an authorized VCS-driven workspace with the appropriate repository and branch and review the plan/apply settings.
D:Inspect current HCP project assignments, workspace ownership patterns, and project/team permission boundaries. This relates to hcp projects group workspaces by ownership rather than the matching diagnosis-and-remediation pair required here. Check: Inspect workspace workflow configuration, VCS repository association, branch selection and recent run triggers. Then change: Configure an authorized VCS-driven workspace with the appropriate repository and branch and review the plan/apply settings.
E:Connect the configuration to the appropriate HCP Terraform workspace and select a governed remote execution workflow. This relates to hcp terraform remote execution and state hosting rather than the matching diagnosis-and-remediation pair required here. Check: Inspect workspace workflow configuration, VCS repository association, branch selection and recent run triggers. Then change: Configure an authorized VCS-driven workspace with the appropriate repository and branch and review the plan/apply settings.
Question 124
During a separate-region Terraform rollout in an approved staging account, the following condition occurs: An inherited Terraform configuration references a provider without declaring its registry source, so a team cannot reliably establish which plugin will manage resources. The configuration should behave consistently without broadening access. Which TWO complementary choices identify the cause and implement the appropriate fix? Select TWO.
- Review provider requirement declarations, provider configuration blocks, and the platform's supported authentication mechanisms.
- Pass the correct provider configuration explicitly through the module's providers map and declare configuration_aliases when required.
- Declare the provider's correct registry source and compatible version constraint in required_providers, then initialize again.
- Use a justified upper-bound or compatible-release constraint such as ~> 5.0 and test upgrades before committing them.
- Review required_providers declarations, provider source addresses, existing lock entries, and initialization output.
Explanation
Correct Answers
C:Declare the provider's correct registry source and compatible version constraint in required_providers, then initialize again. The required_providers mapping identifies the plugin source and compatibility constraint, separate from provider authentication settings. Confirm the cause with: Review required_providers declarations, provider source addresses, existing lock entries, and initialization output. A concrete acceptance test is: Terraform resolves the intended plugin source consistently instead of relying on historical default namespace guesses. This forms one element of the required two-step diagnosis and correction. This matters here because during a separate-region Terraform rollout in an approved staging account, the following condition occurs: An….
E:Review required_providers declarations, provider source addresses, existing lock entries, and initialization output. The required_providers mapping identifies the plugin source and compatibility constraint, separate from provider authentication settings. A justified correction is: Declare the provider's correct registry source and compatible version constraint in required_providers, then initialize again. This forms one element of the required two-step diagnosis and correction. This matters here because during a separate-region Terraform rollout in an approved staging account, the following condition occurs: An….
Incorrect Answers
A:Review provider requirement declarations, provider configuration blocks, and the platform's supported authentication mechanisms. This relates to provider block credentials versus required_providers rather than the matching diagnosis-and-remediation pair required here. Check: Review required_providers declarations, provider source addresses, existing lock entries, and initialization output. Then change: Declare the provider's correct registry source and compatible version constraint in required_providers, then initialize again.
B:Pass the correct provider configuration explicitly through the module's providers map and declare configuration_aliases when required. This relates to module provider mapping for aliased configurations rather than the matching diagnosis-and-remediation pair required here. Check: Review required_providers declarations, provider source addresses, existing lock entries, and initialization output. Then change: Declare the provider's correct registry source and compatible version constraint in required_providers, then initialize again.
D:Use a justified upper-bound or compatible-release constraint such as ~> 5.0 and test upgrades before committing them. This relates to provider version range semantics rather than the matching diagnosis-and-remediation pair required here. Check: Review required_providers declarations, provider source addresses, existing lock entries, and initialization output. Then change: Declare the provider's correct registry source and compatible version constraint in required_providers, then initialize again.
Question 125
In a clean CI runner initializing a Terraform root configuration, the following condition occurs: A maintenance engineer changes a provider constraint but an existing workspace continues using an older locked plugin even though a newer permitted version is needed. The engineers must keep provider choices and identities reproducible. Which investigation would most directly establish the reported Terraform failure?
- Inspect the version constraint, lock file version, and the difference between ordinary terraform init and terraform init -upgrade behavior.
- Compare .terraform.lock.hcl checksums and selected versions against required_providers constraints and provider init logs.
- Inspect provider alias blocks and the resource's provider selection, including default identity and account-specific configuration.
- Inspect provider alias identities, authentication scopes, and which modules or resources select each instance.
Explanation
Correct Answer
A:Inspect the version constraint, lock file version, and the difference between ordinary terraform init and terraform init -upgrade behavior. Terraform init normally honors locked versions; -upgrade allows choosing newer compatible selections under the declared constraints. A justified correction is: Review the upgrade impact and run terraform init -upgrade intentionally, then commit the updated lock selection after validation.
Incorrect Answers
B:Compare.terraform.lock.hcl checksums and selected versions against required_providers constraints and provider init logs. This inspects dependency lock file reproducible selection rather than the reported controlled provider upgrade using init upgrade issue. The decisive investigation is: Inspect the version constraint, lock file version, and the difference between ordinary terraform init and terraform init -upgrade behavior.
C:Inspect provider alias blocks and the resource's provider selection, including default identity and account-specific configuration. This inspects provider alias for multiple accounts rather than the reported controlled provider upgrade using init upgrade issue. The decisive investigation is: Inspect the version constraint, lock file version, and the difference between ordinary terraform init and terraform init -upgrade behavior.
D:Inspect provider alias identities, authentication scopes, and which modules or resources select each instance. This inspects multiple provider instances requiring separate authentication rather than the reported controlled provider upgrade using init upgrade issue. The decisive investigation is: Inspect the version constraint, lock file version, and the difference between ordinary terraform init and terraform init -upgrade behavior.
Question 126
During a cross-platform infrastructure standardization exercise, the following condition occurs: Developers assume a Terraform virtual machine resource from cloud A can be copied unchanged into cloud B just because the configuration language is the same. The decision must preserve ownership and minimize undocumented changes. Select TWO: the decisive first check and the change that directly addresses the problem.
- Use the relevant approved providers in Terraform and define cross-service references through managed configuration outputs or values.
- Compare the runbook's procedural steps with a version-controlled declarative inventory of desired resources and their attributes.
- Compare provider-specific resource schemas, instance properties, network dependencies, and modules' input interfaces.
- Create separate provider-aware modules behind a shared application interface rather than treating resource type names as portable across platforms.
- Run a reviewed Terraform plan before application, investigate unexpected replacements, and require appropriate authorization.
Explanation
Correct Answers
C:Compare provider-specific resource schemas, instance properties, network dependencies, and modules' input interfaces. Terraform's common workflow does not make different cloud vendor APIs or resource type attributes interchangeable. A justified correction is: Create separate provider-aware modules behind a shared application interface rather than treating resource type names as portable across platforms. This forms one element of the required two-step diagnosis and correction.
D:Create separate provider-aware modules behind a shared application interface rather than treating resource type names as portable across platforms. Terraform's common workflow does not make different cloud vendor APIs or resource type attributes interchangeable. Confirm the cause with: Compare provider-specific resource schemas, instance properties, network dependencies, and modules' input interfaces. A concrete acceptance test is: Both platform implementations satisfy agreed application outputs using their own valid resource schemas and API constraints. This forms one element of the required two-step diagnosis and correction.
Incorrect Answers
A:Use the relevant approved providers in Terraform and define cross-service references through managed configuration outputs or values. This relates to multi-cloud providers under one terraform workflow rather than the matching diagnosis-and-remediation pair required here. Check: Compare provider-specific resource schemas, instance properties, network dependencies, and modules' input interfaces. Then change: Create separate provider-aware modules behind a shared application interface rather than treating resource type names as portable across platforms.
B:Compare the runbook's procedural steps with a version-controlled declarative inventory of desired resources and their attributes. This relates to declarative desired state versus imperative console runbook rather than the matching diagnosis-and-remediation pair required here. Check: Compare provider-specific resource schemas, instance properties, network dependencies, and modules' input interfaces. Then change: Create separate provider-aware modules behind a shared application interface rather than treating resource type names as portable across platforms.
E:Run a reviewed Terraform plan before application, investigate unexpected replacements, and require appropriate authorization. This relates to terraform plan review as change safety barrier rather than the matching diagnosis-and-remediation pair required here. Check: Compare provider-specific resource schemas, instance properties, network dependencies, and modules' input interfaces. Then change: Create separate provider-aware modules behind a shared application interface rather than treating resource type names as portable across platforms.
Question 127
During a separate-region Terraform rollout in an approved staging account, the following condition occurs: A root output refers to the ID of a resource just created, yet another workflow assumes the string is known before the apply finishes. The configuration should behave consistently without broadening access. Select TWO: the decisive first check and the change that directly addresses the problem.
- Move state to an access-controlled encrypted backend, restrict readers, and avoid storing secret inputs where ephemeral paths are supported.
- Use resource references and output values so computed identifiers resolve after creation rather than hardcoding an invented ID.
- Check which resource attributes are computed by the provider and how state records them after successful operations.
- Review the child module provider requirements and root module providers mapping for the child call.
- Define explicitly aliased provider configurations and assign the production resource to the intended alias.
Explanation
Correct Answers
B:Use resource references and output values so computed identifiers resolve after creation rather than hardcoding an invented ID. State stores known provider-returned attributes and supports dependency references; some values remain unknown until apply. Confirm the cause with: Check which resource attributes are computed by the provider and how state records them after successful operations. A concrete acceptance test is: The first plan marks unknown values appropriately and a subsequent apply publishes the actual ID through the tracked state. This forms one element of the required two-step diagnosis and correction.
C:Check which resource attributes are computed by the provider and how state records them after successful operations. State stores known provider-returned attributes and supports dependency references; some values remain unknown until apply. A justified correction is: Use resource references and output values so computed identifiers resolve after creation rather than hardcoding an invented ID. This forms one element of the required two-step diagnosis and correction.
Incorrect Answers
A:Move state to an access-controlled encrypted backend, restrict readers, and avoid storing secret inputs where ephemeral paths are supported. This relates to state as sensitive operational metadata rather than the matching diagnosis-and-remediation pair required here. Check: Check which resource attributes are computed by the provider and how state records them after successful operations. Then change: Use resource references and output values so computed identifiers resolve after creation rather than hardcoding an invented ID.
D:Review the child module provider requirements and root module providers mapping for the child call. This relates to module provider mapping for aliased configurations rather than the matching diagnosis-and-remediation pair required here. Check: Check which resource attributes are computed by the provider and how state records them after successful operations. Then change: Use resource references and output values so computed identifiers resolve after creation rather than hardcoding an invented ID.
E:Define explicitly aliased provider configurations and assign the production resource to the intended alias. This relates to provider alias for multiple accounts rather than the matching diagnosis-and-remediation pair required here. Check: Check which resource attributes are computed by the provider and how state records them after successful operations. Then change: Use resource references and output values so computed identifiers resolve after creation rather than hardcoding an invented ID.
Question 128
During a controlled module integration test for a production Terraform stack, the following condition occurs: A Terraform engineer wants to reference an existing DNS zone owned by another team but declares a new resource block and unintentionally plans to create a second zone. The desired fix must avoid unrelated resource changes. What targeted engineering response should the team implement?
- Use lifecycle create_before_destroy when the platform allows coexistence and design unique names or a controlled cutover if required.
- Use a resource precondition or postcondition for a hard lifecycle invariant and reserve check blocks for non-blocking validation reports.
- Reference the correct keyed resource instance or use a reviewed moved block to preserve its existing state identity during refactoring.
- Use a provider-supported data block to look up the existing zone and reserve resource declarations for objects this state should manage.
Explanation
Correct Answer
D:Use a provider-supported data block to look up the existing zone and reserve resource declarations for objects this state should manage. A data block queries information from remote systems while a resource block declares an object Terraform manages across its lifecycle. Confirm the cause with: Inspect whether the zone should be managed or merely read, and compare the resource block with the provider's data source schema. A concrete acceptance test is: Terraform reads the existing DNS zone information and plans no duplicate zone creation from the lookup alone.
Incorrect Answers
A:Use lifecycle create_before_destroy when the platform allows coexistence and design unique names or a controlled cutover if required. This could address create_before_destroy lifecycle for availability, but it does not correct the indicated data source versus managed resource definition mechanism. The relevant fix is: Use a provider-supported data block to look up the existing zone and reserve resource declarations for objects this state should manage.
B:Use a resource precondition or postcondition for a hard lifecycle invariant and reserve check blocks for non-blocking validation reports. This could address check block observability versus hard failure, but it does not correct the indicated data source versus managed resource definition mechanism. The relevant fix is: Use a provider-supported data block to look up the existing zone and reserve resource declarations for objects this state should manage.
C:Reference the correct keyed resource instance or use a reviewed moved block to preserve its existing state identity during refactoring. This could address resource addressing with repeated instances, but it does not correct the indicated data source versus managed resource definition mechanism. The relevant fix is: Use a provider-supported data block to look up the existing zone and reserve resource declarations for objects this state should manage.
Question 129
As a second engineer rehearses an infrastructure state migration, the following condition occurs: A team assumes a default Terraform directory automatically stores state in a centralized shared service, but every engineer sees their own terraform.tfstate file. The operation must not delete or duplicate existing production objects. Select TWO: the decisive first check and the change that directly addresses the problem.
- Configure a suitable remote backend for shared operations or explicitly isolate disposable local state with restricted permissions.
- Declare a supported backend block with a reviewed storage location, then initialize and migrate state under controlled conditions.
- Select the intended workspace before planning and check the corresponding workspace-specific state directory.
- Inspect backend initialization and saved plan artifacts for embedded configuration parameters and authentication values.
- Inspect the backend configuration and state file location on each workstation to identify local state behavior.
Explanation
Correct Answers
A:Configure a suitable remote backend for shared operations or explicitly isolate disposable local state with restricted permissions. The local backend persists state on the executing filesystem; it does not provide shared remote coordination by default. Confirm the cause with: Inspect the backend configuration and state file location on each workstation to identify local state behavior. A concrete acceptance test is: Authorized team members reference one intended remote snapshot rather than maintaining conflicting independent local files. This forms one element of the required two-step diagnosis and correction. This matters here because as a second engineer rehearses an infrastructure state migration, the following condition occurs: A team assumes a….
E:Inspect the backend configuration and state file location on each workstation to identify local state behavior. The local backend persists state on the executing filesystem; it does not provide shared remote coordination by default. A justified correction is: Configure a suitable remote backend for shared operations or explicitly isolate disposable local state with restricted permissions. This forms one element of the required two-step diagnosis and correction. This matters here because as a second engineer rehearses an infrastructure state migration, the following condition occurs: A team assumes a….
Incorrect Answers
B:Declare a supported backend block with a reviewed storage location, then initialize and migrate state under controlled conditions. This relates to remote backend block configuration rather than the matching diagnosis-and-remediation pair required here. Check: Inspect the backend configuration and state file location on each workstation to identify local state behavior. Then change: Configure a suitable remote backend for shared operations or explicitly isolate disposable local state with restricted permissions.
C:Select the intended workspace before planning and check the corresponding workspace-specific state directory. This relates to local workspace state separation rather than the matching diagnosis-and-remediation pair required here. Check: Inspect the backend configuration and state file location on each workstation to identify local state behavior. Then change: Configure a suitable remote backend for shared operations or explicitly isolate disposable local state with restricted permissions. This matters here because as a second engineer rehearses an infrastructure state migration, the following condition occurs: A team assumes a….
D:Inspect backend initialization and saved plan artifacts for embedded configuration parameters and authentication values. This relates to backend credentials kept out of plan artifacts rather than the matching diagnosis-and-remediation pair required here. Check: Inspect the backend configuration and state file location on each workstation to identify local state behavior. Then change: Configure a suitable remote backend for shared operations or explicitly isolate disposable local state with restricted permissions.
Question 130
During an isolated staging rehearsal of the Terraform workflow, the following condition occurs: A novice team runs terraform apply in a directory containing unreviewed edits and cannot explain the difference between proposed and actual resource changes. The operator must obtain auditable evidence before touching production resources. What measurable postchange observation would confirm that the correction worked?
- A planned change is inspected before approval, then the resulting infrastructure matches the reviewed configuration where supported.
- A full plan becomes clean after approved changes and does not conceal unrelated pending resource actions.
- A reviewed apply changes only the intended managed attribute and the subsequent plan shows no unexpected pending action.
- The apply executes the selected reviewed plan instead of silently producing a new unreviewed plan from changed inputs.
Explanation
Correct Answer
A:A planned change is inspected before approval, then the resulting infrastructure matches the reviewed configuration where supported. Terraform's normal lifecycle separates desired-state authoring and plan evaluation from the operation that changes managed infrastructure. It tests the correction: Use the write, init, plan, and apply sequence with a deliberate review checkpoint before changing the remote environment.
Incorrect Answers
B:A full plan becomes clean after approved changes and does not conceal unrelated pending resource actions. This might validate targeted apply limitations for normal changes, but it does not prove that core write plan apply workflow order was resolved. Confirm instead: A planned change is inspected before approval, then the resulting infrastructure matches the reviewed configuration where supported.
C:A reviewed apply changes only the intended managed attribute and the subsequent plan shows no unexpected pending action. This might validate workflow repeatability after configuration change, but it does not prove that core write plan apply workflow order was resolved. Confirm instead: A planned change is inspected before approval, then the resulting infrastructure matches the reviewed configuration where supported.
D:The apply executes the selected reviewed plan instead of silently producing a new unreviewed plan from changed inputs. This might validate saved execution plan for controlled deployment, but it does not prove that core write plan apply workflow order was resolved. Confirm instead: A planned change is inspected before approval, then the resulting infrastructure matches the reviewed configuration where supported.