Question 730
A Terraform rollout has two separate requirements: first, stop tracking an object in state but deliberately leave it deployed; second, change a resource state address to match a configuration refactor. Which assignment of mechanisms correctly handles both responsibilities?
- First use removed block with destroy=false; then use Drift reconciliation to configuration.
- First use removed block with destroy=false; then use terraform state mv.
- First use Drift reconciliation to configuration; then use Remote drift detection during plan.
- First use Remote drift detection during plan; then use terraform state mv.
- First use terraform state mv; then use removed block with destroy=false.
Explanation
Correct Answer
B:The first requirement, to stop tracking an object in state but deliberately leave it deployed, is handled by removed block with destroy=false: A removed block declares that Terraform should forget a resource without deleting it when destroy=false. The second requirement, to change a resource state address to match a configuration refactor, is handled by terraform state mv: state mv rebinds an existing object under a new compatible address. Each of these mechanisms has a distinct responsibility.
Incorrect Answers
A:For the requested tasks to stop tracking an object in state but deliberately leave it deployed and change a resource state address to match a configuration refactor, the first candidate removed block with destroy=false addresses stop tracking an object in state but deliberately leave it deployed; the second candidate Drift reconciliation to configuration addresses restore externally modified resource settings to desired code values. This mapping fails because the second mechanism primarily supports the task to restore externally modified resource settings to desired code values; the actual requirements are stop tracking an object in state but deliberately leave it deployed first and change a resource state address to match a configuration refactor second.
C:For the requested tasks to stop tracking an object in state but deliberately leave it deployed and change a resource state address to match a configuration refactor, the first candidate Drift reconciliation to configuration addresses restore externally modified resource settings to desired code values; the second candidate Remote drift detection during plan addresses recognize that a resource was changed outside Terraform. This mapping fails because the first mechanism primarily supports the task to restore externally modified resource settings to desired code values and the second mechanism primarily supports the task to recognize that a resource was changed outside Terraform; the actual requirements are stop tracking an object in state but deliberately leave it deployed first and change a resource state address to match a configuration refactor second.
D:For the requested tasks to stop tracking an object in state but deliberately leave it deployed and change a resource state address to match a configuration refactor, the first candidate Remote drift detection during plan addresses recognize that a resource was changed outside Terraform; the second candidate terraform state mv addresses change a resource state address to match a configuration refactor. This mapping fails because the first mechanism primarily supports the task to recognize that a resource was changed outside Terraform; the actual requirements are stop tracking an object in state but deliberately leave it deployed first and change a resource state address to match a configuration refactor second.
E:For the requested tasks to stop tracking an object in state but deliberately leave it deployed and change a resource state address to match a configuration refactor, the first candidate terraform state mv addresses change a resource state address to match a configuration refactor; the second candidate removed block with destroy=false addresses stop tracking an object in state but deliberately leave it deployed. This mapping fails because the first mechanism primarily supports the task to change a resource state address to match a configuration refactor and the second mechanism primarily supports the task to stop tracking an object in state but deliberately leave it deployed; the actual requirements are stop tracking an object in state but deliberately leave it deployed first and change a resource state address to match a configuration refactor second.
Question 731
A Terraform rollout has two separate requirements: first, pin a VCS module using its source ref rather than registry version; second, constrain a module to releases with an expected interface. Which assignment of mechanisms correctly handles both responsibilities?
- First use Version of Git module; then use Module versus provider version lock.
- First use Module versus provider version lock; then use Registry module version constraint.
- First use Version of Git module; then use Module release compatibility.
- First use Module release compatibility; then use Version of Git module.
- First use Registry module version constraint; then use Module release compatibility.
Explanation
Correct Answer
C:The first requirement, to pin a VCS module using its source ref rather than registry version, is handled by Version of Git module: A ?ref=tag or commit in a Git module source selects the VCS revision to fetch. The second requirement, to constrain a module to releases with an expected interface, is handled by Module release compatibility: A version range helps avoid inadvertently selecting a module revision with breaking input or output changes. Each of these mechanisms has a distinct responsibility.
Incorrect Answers
A:For the requested tasks to pin a VCS module using its source ref rather than registry version and constrain a module to releases with an expected interface, the first candidate Version of Git module addresses pin a VCS module using its source ref rather than registry version; the second candidate Module versus provider version lock addresses track module release selection separately from provider lock file behavior. This mapping fails because the second mechanism primarily supports the task to track module release selection separately from provider lock file behavior; the actual requirements are pin a VCS module using its source ref rather than registry version first and constrain a module to releases with an expected interface second.
B:For the requested tasks to pin a VCS module using its source ref rather than registry version and constrain a module to releases with an expected interface, the first candidate Module versus provider version lock addresses track module release selection separately from provider lock file behavior; the second candidate Registry module version constraint addresses select module releases meeting a declared compatibility range. This mapping fails because the first mechanism primarily supports the task to track module release selection separately from provider lock file behavior and the second mechanism primarily supports the task to select module releases meeting a declared compatibility range; the actual requirements are pin a VCS module using its source ref rather than registry version first and constrain a module to releases with an expected interface second.
D:For the requested tasks to pin a VCS module using its source ref rather than registry version and constrain a module to releases with an expected interface, the first candidate Module release compatibility addresses constrain a module to releases with an expected interface; the second candidate Version of Git module addresses pin a VCS module using its source ref rather than registry version. This mapping fails because the first mechanism primarily supports the task to constrain a module to releases with an expected interface and the second mechanism primarily supports the task to pin a VCS module using its source ref rather than registry version; the actual requirements are pin a VCS module using its source ref rather than registry version first and constrain a module to releases with an expected interface second.
E:For the requested tasks to pin a VCS module using its source ref rather than registry version and constrain a module to releases with an expected interface, the first candidate Registry module version constraint addresses select module releases meeting a declared compatibility range; the second candidate Module release compatibility addresses constrain a module to releases with an expected interface. This mapping fails because the first mechanism primarily supports the task to select module releases meeting a declared compatibility range; the actual requirements are pin a VCS module using its source ref rather than registry version first and constrain a module to releases with an expected interface second.
Question 732
A Terraform rollout has two separate requirements: first, move a locally managed state history into an HCP Terraform workspace; second, control the Terraform version used for remote runs. Which assignment of mechanisms correctly handles both responsibilities?
- First use Terraform CLI login to HCP; then use HCP Terraform workspace version settings.
- First use HCP Terraform workspace version settings; then use Local to HCP state migration.
- First use Local to HCP state migration; then use HCP Terraform workspace variable configuration.
- First use Local to HCP state migration; then use HCP Terraform workspace version settings.
- First use HCP Terraform workspace variable configuration; then use Terraform CLI login to HCP.
Explanation
Correct Answer
D:The first requirement, to move a locally managed state history into an HCP Terraform workspace, is handled by Local to HCP state migration: Changing state integration and reinitializing can migrate state into HCP Terraform when configured correctly. The second requirement, to control the Terraform version used for remote runs, is handled by HCP Terraform workspace version settings: Workspace settings can select the Terraform Core version used in HCP remote execution. Each of these mechanisms has a distinct responsibility.
Incorrect Answers
A:For the requested tasks to move a locally managed state history into an HCP Terraform workspace and control the Terraform version used for remote runs, the first candidate Terraform CLI login to HCP addresses authenticate local Terraform CLI operations against HCP Terraform; the second candidate HCP Terraform workspace version settings addresses control the Terraform version used for remote runs. This mapping fails because the first mechanism primarily supports the task to authenticate local Terraform CLI operations against HCP Terraform; the actual requirements are move a locally managed state history into an HCP Terraform workspace first and control the Terraform version used for remote runs second.
B:For the requested tasks to move a locally managed state history into an HCP Terraform workspace and control the Terraform version used for remote runs, the first candidate HCP Terraform workspace version settings addresses control the Terraform version used for remote runs; the second candidate Local to HCP state migration addresses move a locally managed state history into an HCP Terraform workspace. This mapping fails because the first mechanism primarily supports the task to control the Terraform version used for remote runs and the second mechanism primarily supports the task to move a locally managed state history into an HCP Terraform workspace; the actual requirements are move a locally managed state history into an HCP Terraform workspace first and control the Terraform version used for remote runs second.
C:For the requested tasks to move a locally managed state history into an HCP Terraform workspace and control the Terraform version used for remote runs, the first candidate Local to HCP state migration addresses move a locally managed state history into an HCP Terraform workspace; the second candidate HCP Terraform workspace variable configuration addresses provide Terraform and environment variables to a hosted run. This mapping fails because the second mechanism primarily supports the task to provide Terraform and environment variables to a hosted run; the actual requirements are move a locally managed state history into an HCP Terraform workspace first and control the Terraform version used for remote runs second.
E:For the requested tasks to move a locally managed state history into an HCP Terraform workspace and control the Terraform version used for remote runs, the first candidate HCP Terraform workspace variable configuration addresses provide Terraform and environment variables to a hosted run; the second candidate Terraform CLI login to HCP addresses authenticate local Terraform CLI operations against HCP Terraform. This mapping fails because the first mechanism primarily supports the task to provide Terraform and environment variables to a hosted run and the second mechanism primarily supports the task to authenticate local Terraform CLI operations against HCP Terraform; the actual requirements are move a locally managed state history into an HCP Terraform workspace first and control the Terraform version used for remote runs second.
Question 733
An operator chooses the mechanism "Dynamic nested block" for a Terraform project. Which outcome should this choice support?
- transform a collection into a list of calculated values
- include only elements satisfying an if condition in a derived collection
- generate repeated nested configuration blocks from a collection
- embed evaluated expressions in a Terraform string
- choose between two values based on a boolean condition
- calculate collection values without an external provisioner
Explanation
Correct Answer
C:The practical result of Dynamic nested block, used to generate repeated nested configuration blocks from a collection, is: A dynamic block emits nested blocks where the enclosing resource schema permits them. A qualification for this effect is: Dynamic cannot generate resource or provider blocks at the root level.
Incorrect Answers
A:That outcome applies to for expression list projection, intended to transform a collection into a list of calculated values, rather than the question's feature Dynamic nested block: A bracketed for expression maps each element to a new value using a declared iterator. Unlike for expression list projection, Dynamic nested block is intended to generate repeated nested configuration blocks from a collection, not to transform a collection into a list of calculated values.
B:That outcome applies to for expression filtering, intended to include only elements satisfying an if condition in a derived collection, rather than the question's feature Dynamic nested block: A for expression's optional if clause filters elements while projecting results. Unlike for expression filtering, Dynamic nested block is intended to generate repeated nested configuration blocks from a collection, not to include only elements satisfying an if condition in a derived collection.
D:That outcome applies to Template interpolation, intended to embed evaluated expressions in a Terraform string, rather than the question's feature Dynamic nested block: The ${...} syntax can interpolate an expression into a quoted string or template. Unlike Template interpolation, Dynamic nested block is intended to generate repeated nested configuration blocks from a collection, not to embed evaluated expressions in a Terraform string.
E:That outcome applies to Conditional expression, intended to choose between two values based on a boolean condition, rather than the question's feature Dynamic nested block: Terraform's condition ? true_value : false_value expression selects a value based on a predicate. Unlike Conditional expression, Dynamic nested block is intended to generate repeated nested configuration blocks from a collection, not to choose between two values based on a boolean condition.
F:That outcome applies to Built-in collection function, intended to calculate collection values without an external provisioner, rather than the question's feature Dynamic nested block: Functions such as length, concat, and merge manipulate Terraform values during expression evaluation. Unlike Built-in collection function, Dynamic nested block is intended to generate repeated nested configuration blocks from a collection, not to calculate collection values without an external provisioner.
Question 734
The team is documenting risks of Service-agnostic orchestration while planning to control DNS, SaaS, and cloud resources through a common configuration tool. Which caveat specifically applies to that mechanism?
- A unified plan cannot guarantee a distributed transaction across separate providers.
- Service-agnostic does not mean resource schemas are interchangeable.
- The dependency does not remove authentication or network prerequisites on either platform.
- Replacing a cloud provider normally requires rewriting provider-dependent resources.
Explanation
Correct Answer
B:For Service-agnostic orchestration in the task to control DNS, SaaS, and cloud resources through a common configuration tool, the important caution is: Service-agnostic does not mean resource schemas are interchangeable. The reason this matters is its actual behavior: Terraform providers expose resource and data types beyond infrastructure hosted by a cloud vendor.
Incorrect Answers
A:The proposed warning belongs to Common Terraform lifecycle across providers, which serves the different goal to plan and apply resources from several providers in one run, rather than to Service-agnostic orchestration: Terraform Core constructs a dependency graph and asks installed providers to implement their own actions. The question concerns Service-agnostic orchestration acting to control DNS, SaaS, and cloud resources through a common configuration tool, not a limit of Common Terraform lifecycle across providers.
C:The proposed warning belongs to Cross-platform dependency references, which serves the different goal to use output from one service to configure another supported service, rather than to Service-agnostic orchestration: References can establish ordering when a resource on one platform consumes attributes from another resource. The question concerns Service-agnostic orchestration acting to control DNS, SaaS, and cloud resources through a common configuration tool, not a limit of Cross-platform dependency references.
D:The proposed warning belongs to Vendor portability through modules, which serves the different goal to abstract a deployment pattern while keeping provider details explicit, rather than to Service-agnostic orchestration: A module can offer common input and output conventions even if its implementation uses provider-specific resources. The question concerns Service-agnostic orchestration acting to control DNS, SaaS, and cloud resources through a common configuration tool, not a limit of Vendor portability through modules.
Question 735
The team is documenting risks of TF_LOG_CORE environment variable while planning to focus debugging on Terraform Core behavior rather than provider messages. Which caveat specifically applies to that mechanism?
- Core logging does not substitute for investigating remote API authorization errors.
- Leaving verbose logs enabled can produce large sensitive artifacts.
- It is too noisy and potentially sensitive for routine production pipelines.
- A log that shows an error does not automatically identify the root cause without context.
Explanation
Correct Answer
A:For TF_LOG_CORE environment variable in the task to focus debugging on Terraform Core behavior rather than provider messages, the important caution is: Core logging does not substitute for investigating remote API authorization errors. The reason this matters is its actual behavior: TF_LOG_CORE can set logging for Terraform Core separately from provider plugin output.
Incorrect Answers
B:The proposed warning belongs to Disable debug logging after diagnosis, which serves the different goal to avoid collecting unnecessary sensitive operational output, rather than to TF_LOG_CORE environment variable: Unset debug environment variables or restore normal log settings when the investigation ends. The question concerns TF_LOG_CORE environment variable acting to focus debugging on Terraform Core behavior rather than provider messages, not a limit of Disable debug logging after diagnosis.
C:The proposed warning belongs to TRACE diagnostic level, which serves the different goal to capture highly detailed events for a stubborn Terraform problem, rather than to TF_LOG_CORE environment variable: TRACE is a very verbose Terraform logging level useful for deep troubleshooting. The question concerns TF_LOG_CORE environment variable acting to focus debugging on Terraform Core behavior rather than provider messages, not a limit of TRACE diagnostic level.
D:The proposed warning belongs to Log analysis and source protection, which serves the different goal to review debugging evidence without publishing API secrets, rather than to TF_LOG_CORE environment variable: Diagnostic logs should be stored and shared according to secret-handling policy. The question concerns TF_LOG_CORE environment variable acting to focus debugging on Terraform Core behavior rather than provider messages, not a limit of Log analysis and source protection.
Question 736
A team is adjusting its declarative infrastructure process to avoid remote refresh reads when an intentional troubleshooting constraint requires it. Which mechanism most directly meets this particular need?
- Plan without state refresh
- terraform plan command
- Replacement plan indicator
- Machine-readable plan inspection
- Refresh-only planning
Explanation
Correct Answer
A:The task is to avoid remote refresh reads when an intentional troubleshooting constraint requires it; Plan without state refresh directly supports that requirement: terraform plan -refresh=false uses existing state without refreshing live objects before planning. Its relevant boundary is: A plan based on stale state can be inaccurate about real infrastructure.
Incorrect Answers
B:terraform plan command is designed to preview actions required to reach the declared infrastructure state, whereas this task is to avoid remote refresh reads when an intentional troubleshooting constraint requires it: terraform plan shows changes Terraform expects, including creates, updates, deletes, and replacements. Against Plan without state refresh, its limitation is: Plan does not persist the proposed changes to remote infrastructure.
C:Replacement plan indicator is designed to recognize that a proposed change will replace an existing resource, whereas this task is to avoid remote refresh reads when an intentional troubleshooting constraint requires it: The plan symbols -/+ or +/- indicate replacement behavior and its creation/destruction ordering. Against Plan without state refresh, its limitation is: An in-place update is represented differently and preserves the existing instance.
D:Machine-readable plan inspection is designed to convert a saved plan into JSON for automated analysis, whereas this task is to avoid remote refresh reads when an intentional troubleshooting constraint requires it: terraform show -json change.tfplan exposes plan details for tooling. Against Plan without state refresh, its limitation is: The JSON can expose secrets and requires secure handling.
E:Refresh-only planning is designed to inspect externally changed infrastructure without planning configuration reconciliation, whereas this task is to avoid remote refresh reads when an intentional troubleshooting constraint requires it: terraform plan -refresh-only proposes updates to state and outputs based on remote observations. Against Plan without state refresh, its limitation is: It does not use configuration to correct drift in the remote service.
Question 737
A deployment design calls for a supported way to detach a resource address from state while leaving the remote object intact. Which mechanism most directly meets this particular need?
- moved block for refactoring
- Remote drift detection during plan
- removed block with destroy=false
- Refresh-only reconciliation
- terraform state mv
- terraform state rm
Explanation
Correct Answer
F:The task is to detach a resource address from state while leaving the remote object intact; terraform state rm directly supports that requirement: state rm forgets the binding but does not delete the real infrastructure object. Its relevant boundary is: If its configuration remains, a later plan can propose creating another object.
Incorrect Answers
A:moved block for refactoring is designed to rename a managed resource address without destroying its remote object, whereas this task is to detach a resource address from state while leaving the remote object intact: A moved block describes an address migration as part of configuration history. Against terraform state rm, its limitation is: It does not transfer a resource between unrelated provider types.
B:Remote drift detection during plan is designed to recognize that a resource was changed outside Terraform, whereas this task is to detach a resource address from state while leaving the remote object intact: Normal plan refresh reads can reveal drift between state and the remote object. Against terraform state rm, its limitation is: Configuration reconciliation requires a subsequent reviewed apply.
C:removed block with destroy=false is designed to stop tracking an object in state but deliberately leave it deployed, whereas this task is to detach a resource address from state while leaving the remote object intact: A removed block declares that Terraform should forget a resource without deleting it when destroy=false. Against terraform state rm, its limitation is: Ordinary resource removal from HCL can instead lead to destruction.
D:Refresh-only reconciliation is designed to accept an external change into Terraform state without modifying remote infrastructure, whereas this task is to detach a resource address from state while leaving the remote object intact: A refresh-only plan or apply updates state and outputs to observed values. Against terraform state rm, its limitation is: It does not make the live object conform to an old configuration value.
E:terraform state mv is designed to change a resource state address to match a configuration refactor, whereas this task is to detach a resource address from state while leaving the remote object intact: state mv rebinds an existing object under a new compatible address. Against terraform state rm, its limitation is: It does not rename or migrate the remote object through its provider API.
Question 738
The team is documenting risks of Dynamic nested block while planning to generate repeated nested configuration blocks from a collection. Which caveat specifically applies to that mechanism?
- The two branches need compatible types for Terraform to reconcile the result.
- Dynamic cannot generate resource or provider blocks at the root level.
- A for expression calculates values but does not itself create resource instances.
- Filtering a collection is different from lifecycle ignore_changes.
Explanation
Correct Answer
B:For Dynamic nested block in the task to generate repeated nested configuration blocks from a collection, the important caution is: Dynamic cannot generate resource or provider blocks at the root level. The reason this matters is its actual behavior: A dynamic block emits nested blocks where the enclosing resource schema permits them.
Incorrect Answers
A:The proposed warning belongs to Conditional expression, which serves the different goal to choose between two values based on a boolean condition, rather than to Dynamic nested block: Terraform's condition ? true_value : false_value expression selects a value based on a predicate. The question concerns Dynamic nested block acting to generate repeated nested configuration blocks from a collection, not a limit of Conditional expression.
C:The proposed warning belongs to for expression list projection, which serves the different goal to transform a collection into a list of calculated values, rather than to Dynamic nested block: A bracketed for expression maps each element to a new value using a declared iterator. The question concerns Dynamic nested block acting to generate repeated nested configuration blocks from a collection, not a limit of for expression list projection.
D:The proposed warning belongs to for expression filtering, which serves the different goal to include only elements satisfying an if condition in a derived collection, rather than to Dynamic nested block: A for expression's optional if clause filters elements while projecting results. The question concerns Dynamic nested block acting to generate repeated nested configuration blocks from a collection, not a limit of for expression filtering.
Question 739
A platform engineering group needs to update a local path module without applying registry release versioning. Which mechanism most directly meets this particular need?
- Local module development lifecycle
- Registry module version constraint
- Module upgrade through init
- Exact registry module version
Explanation
Correct Answer
A:The task is to update a local path module without applying registry release versioning; Local module development lifecycle directly supports that requirement: Local module source code is read from its path and does not use a version argument. Its relevant boundary is: A local edit can still change the next plan and should be reviewed.
Incorrect Answers
B:Registry module version constraint is designed to select module releases meeting a declared compatibility range, whereas this task is to update a local path module without applying registry release versioning: A registry module call accepts a version argument that chooses supported release versions. Against Local module development lifecycle, its limitation is: An unpinned module version may drift as newer releases appear.
C:Module upgrade through init is designed to fetch a newly allowed version after editing the module version requirement, whereas this task is to update a local path module without applying registry release versioning: Rerunning terraform init downloads compatible module source versions when module requirements change. Against Local module development lifecycle, its limitation is: terraform apply does not automatically fetch newly declared module packages.
D:Exact registry module version is designed to make a published module dependency deterministic across clean installs, whereas this task is to update a local path module without applying registry release versioning: An exact version requirement identifies one registry module release. Against Local module development lifecycle, its limitation is: Pinning a module does not pin its provider dependencies unless constrained separately.
Question 740
An engineer must update an existing Terraform workflow to initiate workspace operations through familiar Terraform commands. Which mechanism most directly meets this particular need?
- HCP Terraform workspace version settings
- Local to HCP state migration
- CLI-driven HCP runs
- HCP Terraform workspace variable configuration
Explanation
Correct Answer
C:The task is to initiate workspace operations through familiar Terraform commands; CLI-driven HCP runs directly supports that requirement: HCP Terraform supports CLI-driven workflows connected to remote workspace state and operations. Its relevant boundary is: Actual execution behavior depends on the workspace and integration settings.
Incorrect Answers
A:HCP Terraform workspace version settings is designed to control the Terraform version used for remote runs, whereas this task is to initiate workspace operations through familiar Terraform commands: Workspace settings can select the Terraform Core version used in HCP remote execution. Against CLI-driven HCP runs, its limitation is: Provider version constraints remain a separate configuration concern.
B:Local to HCP state migration is designed to move a locally managed state history into an HCP Terraform workspace, whereas this task is to initiate workspace operations through familiar Terraform commands: Changing state integration and reinitializing can migrate state into HCP Terraform when configured correctly. Against CLI-driven HCP runs, its limitation is: A migration should be backed up and verified before discarding the local copy.
D:HCP Terraform workspace variable configuration is designed to provide Terraform and environment variables to a hosted run, whereas this task is to initiate workspace operations through familiar Terraform commands: Workspace variables and variable sets can supply inputs or environment settings to HCP Terraform operations. Against CLI-driven HCP runs, its limitation is: Sensitive values should be marked appropriately and access limited.