Question 710
A deployment design calls for a supported way to move a locally managed state history into an HCP Terraform workspace. Which mechanism most directly meets this particular need?
- Terraform CLI login to HCP
- cloud block HCP integration
- CLI-driven HCP runs
- Local to HCP state migration
Explanation
Correct Answer
D:The task is to move a locally managed state history into an HCP Terraform workspace; Local to HCP state migration directly supports that requirement: Changing state integration and reinitializing can migrate state into HCP Terraform when configured correctly. Its relevant boundary is: A migration should be backed up and verified before discarding the local copy.
Incorrect Answers
A:Terraform CLI login to HCP is designed to authenticate local Terraform CLI operations against HCP Terraform, whereas this task is to move a locally managed state history into an HCP Terraform workspace: terraform login starts an authentication workflow and stores a token for HCP Terraform access. Against Local to HCP state migration, its limitation is: A CLI token is not a cloud provider's deployment credential.
B:cloud block HCP integration is designed to associate a Terraform root configuration with an HCP Terraform organization and workspace, whereas this task is to move a locally managed state history into an HCP Terraform workspace: A cloud block in terraform settings configures the HCP Terraform integration for that root module. Against Local to HCP state migration, its limitation is: It should not be combined with a separate backend block in the same root configuration.
C:CLI-driven HCP runs addresses the different requirement to initiate workspace operations through familiar Terraform commands: HCP Terraform supports CLI-driven workflows connected to remote workspace state and operations; this does not by itself satisfy the requested task to move a locally managed state history into an HCP Terraform workspace. For the stated need, Local to HCP state migration is the more direct mechanism.
Question 711
A colleague recommends the Terraform concept "Built-in collection function". Which use case best matches it?
- generate repeated nested configuration blocks from a collection
- transform a collection into a list of calculated values
- calculate collection values without an external provisioner
- create one resource instance per unique map or set key
- embed evaluated expressions in a Terraform string
Explanation
Correct Answer
C:The practical result of Built-in collection function, used to calculate collection values without an external provisioner, is: Functions such as length, concat, and merge manipulate Terraform values during expression evaluation. A qualification for this effect is: A function call does not fetch remote provider resources unless a data source is used.
Incorrect Answers
A:That outcome applies to Dynamic nested block, intended to generate repeated nested configuration blocks from a collection, rather than the question's feature Built-in collection function: A dynamic block emits nested blocks where the enclosing resource schema permits them. Unlike Dynamic nested block, Built-in collection function is intended to calculate collection values without an external provisioner, not to generate repeated nested configuration blocks from a collection.
B: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 Built-in collection function: A bracketed for expression maps each element to a new value using a declared iterator. Unlike for expression list projection, Built-in collection function is intended to calculate collection values without an external provisioner, not to transform a collection into a list of calculated values.
D:That outcome applies to for_each resource replication, intended to create one resource instance per unique map or set key, rather than the question's feature Built-in collection function: for_each expands a resource into stable keyed instances when its collection is known at planning. Unlike for_each resource replication, Built-in collection function is intended to calculate collection values without an external provisioner, not to create one resource instance per unique map or set key.
E:That outcome applies to Template interpolation, intended to embed evaluated expressions in a Terraform string, rather than the question's feature Built-in collection function: The ${...} syntax can interpolate an expression into a quoted string or template. Unlike Template interpolation, Built-in collection function is intended to calculate collection values without an external provisioner, not to embed evaluated expressions in a Terraform string.
Question 712
An engineer must update an existing Terraform workflow to control DNS, SaaS, and cloud resources through a common configuration tool. Which mechanism most directly meets this particular need?
- Common Terraform lifecycle across providers
- Cross-platform dependency references
- Service-agnostic orchestration
- Vendor portability through modules
Explanation
Correct Answer
C:The task is to control DNS, SaaS, and cloud resources through a common configuration tool; Service-agnostic orchestration directly supports that requirement: Terraform providers expose resource and data types beyond infrastructure hosted by a cloud vendor. Its relevant boundary is: Service-agnostic does not mean resource schemas are interchangeable.
Incorrect Answers
A:Common Terraform lifecycle across providers is designed to plan and apply resources from several providers in one run, whereas this task is to control DNS, SaaS, and cloud resources through a common configuration tool: Terraform Core constructs a dependency graph and asks installed providers to implement their own actions. Against Service-agnostic orchestration, its limitation is: A unified plan cannot guarantee a distributed transaction across separate providers.
B:Cross-platform dependency references is designed to use output from one service to configure another supported service, whereas this task is to control DNS, SaaS, and cloud resources through a common configuration tool: References can establish ordering when a resource on one platform consumes attributes from another resource. Against Service-agnostic orchestration, its limitation is: The dependency does not remove authentication or network prerequisites on either platform.
D:Vendor portability through modules is designed to abstract a deployment pattern while keeping provider details explicit, whereas this task is to control DNS, SaaS, and cloud resources through a common configuration tool: A module can offer common input and output conventions even if its implementation uses provider-specific resources. Against Service-agnostic orchestration, its limitation is: Replacing a cloud provider normally requires rewriting provider-dependent resources.
Question 713
The deployment owner requests a reliable way to focus debugging on Terraform Core behavior rather than provider messages. Which mechanism most directly meets this particular need?
- TF_LOG_CORE environment variable
- TF_LOG environment variable
- TRACE diagnostic level
- Disable debug logging after diagnosis
- Log analysis and source protection
Explanation
Correct Answer
A:The task is to focus debugging on Terraform Core behavior rather than provider messages; TF_LOG_CORE environment variable directly supports that requirement: TF_LOG_CORE can set logging for Terraform Core separately from provider plugin output. Its relevant boundary is: Core logging does not substitute for investigating remote API authorization errors.
Incorrect Answers
B:TF_LOG environment variable is designed to enable Terraform debugging output while investigating a CLI failure, whereas this task is to focus debugging on Terraform Core behavior rather than provider messages: TF_LOG sets a supported logging level such as DEBUG or TRACE for a Terraform process. Against TF_LOG_CORE environment variable, its limitation is: Verbose logs can contain sensitive data and should be protected.
C:TRACE diagnostic level is designed to capture highly detailed events for a stubborn Terraform problem, whereas this task is to focus debugging on Terraform Core behavior rather than provider messages: TRACE is a very verbose Terraform logging level useful for deep troubleshooting. Against TF_LOG_CORE environment variable, its limitation is: It is too noisy and potentially sensitive for routine production pipelines.
D:Disable debug logging after diagnosis is designed to avoid collecting unnecessary sensitive operational output, whereas this task is to focus debugging on Terraform Core behavior rather than provider messages: Unset debug environment variables or restore normal log settings when the investigation ends. Against TF_LOG_CORE environment variable, its limitation is: Leaving verbose logs enabled can produce large sensitive artifacts.
E:Log analysis and source protection is designed to review debugging evidence without publishing API secrets, whereas this task is to focus debugging on Terraform Core behavior rather than provider messages: Diagnostic logs should be stored and shared according to secret-handling policy. Against TF_LOG_CORE environment variable, its limitation is: A log that shows an error does not automatically identify the root cause without context.
Question 714
A configuration walkthrough identifies "Refresh-only planning". Which task is it principally intended to support?
- avoid remote refresh reads when an intentional troubleshooting constraint requires it
- preview actions required to reach the declared infrastructure state
- capture one execution plan for later approval and application
- focus on a small subset for exceptional repair or troubleshooting
- inspect externally changed infrastructure without planning configuration reconciliation
Explanation
Correct Answer
E:The practical result of Refresh-only planning, used to inspect externally changed infrastructure without planning configuration reconciliation, is: terraform plan -refresh-only proposes updates to state and outputs based on remote observations. A qualification for this effect is: It does not use configuration to correct drift in the remote service.
Incorrect Answers
A:That outcome applies to Plan without state refresh, intended to avoid remote refresh reads when an intentional troubleshooting constraint requires it, rather than the question's feature Refresh-only planning: terraform plan -refresh=false uses existing state without refreshing live objects before planning. Unlike Plan without state refresh, Refresh-only planning is intended to inspect externally changed infrastructure without planning configuration reconciliation, not to avoid remote refresh reads when an intentional troubleshooting constraint requires it.
B:That outcome applies to terraform plan command, intended to preview actions required to reach the declared infrastructure state, rather than the question's feature Refresh-only planning: terraform plan shows changes Terraform expects, including creates, updates, deletes, and replacements. Unlike terraform plan command, Refresh-only planning is intended to inspect externally changed infrastructure without planning configuration reconciliation, not to preview actions required to reach the declared infrastructure state.
C:That outcome applies to Plan saved to file, intended to capture one execution plan for later approval and application, rather than the question's feature Refresh-only planning: terraform plan -out=change.tfplan saves an executable binary plan artifact. Unlike Plan saved to file, Refresh-only planning is intended to inspect externally changed infrastructure without planning configuration reconciliation, not to capture one execution plan for later approval and application.
D:That outcome applies to Targeted planning, intended to focus on a small subset for exceptional repair or troubleshooting, rather than the question's feature Refresh-only planning: terraform plan -target=ADDRESS limits the planner's focus to the selected graph portion. Unlike Targeted planning, Refresh-only planning is intended to inspect externally changed infrastructure without planning configuration reconciliation, not to focus on a small subset for exceptional repair or troubleshooting.
Question 715
A Terraform runbook describes the mechanism "removed block with destroy=false". Which responsibility should a reviewer associate with it?
- change a resource state address to match a configuration refactor
- recognize that a resource was changed outside Terraform
- restore externally modified resource settings to desired code values
- stop tracking an object in state but deliberately leave it deployed
- detach a resource address from state while leaving the remote object intact
Explanation
Correct Answer
D:The practical result of removed block with destroy=false, used to stop tracking an object in state but deliberately leave it deployed, is: A removed block declares that Terraform should forget a resource without deleting it when destroy=false. A qualification for this effect is: Ordinary resource removal from HCL can instead lead to destruction.
Incorrect Answers
A:That outcome applies to terraform state mv, intended to change a resource state address to match a configuration refactor, rather than the question's feature removed block with destroy=false: state mv rebinds an existing object under a new compatible address. Unlike terraform state mv, removed block with destroy=false is intended to stop tracking an object in state but deliberately leave it deployed, not to change a resource state address to match a configuration refactor.
B:That outcome applies to Remote drift detection during plan, intended to recognize that a resource was changed outside Terraform, rather than the question's feature removed block with destroy=false: Normal plan refresh reads can reveal drift between state and the remote object. Unlike Remote drift detection during plan, removed block with destroy=false is intended to stop tracking an object in state but deliberately leave it deployed, not to recognize that a resource was changed outside Terraform.
C:That outcome applies to Drift reconciliation to configuration, intended to restore externally modified resource settings to desired code values, rather than the question's feature removed block with destroy=false: A regular plan and apply can propose changing a drifted object back to configured settings. Unlike Drift reconciliation to configuration, removed block with destroy=false is intended to stop tracking an object in state but deliberately leave it deployed, not to restore externally modified resource settings to desired code values.
E:That outcome applies to terraform state rm, intended to detach a resource address from state while leaving the remote object intact, rather than the question's feature removed block with destroy=false: state rm forgets the binding but does not delete the real infrastructure object. Unlike terraform state rm, removed block with destroy=false is intended to stop tracking an object in state but deliberately leave it deployed, not to detach a resource address from state while leaving the remote object intact.
Question 716
A change proposal relies on Built-in collection function for the task to calculate collection values without an external provisioner. Which limitation specifically applies to it?
- Keys cannot be unknown or derived directly from sensitive values.
- Interpolation is not required when an argument can take a direct expression reference.
- A function call does not fetch remote provider resources unless a data source is used.
- Dynamic cannot generate resource or provider blocks at the root level.
Explanation
Correct Answer
C:For Built-in collection function in the task to calculate collection values without an external provisioner, the important caution is: A function call does not fetch remote provider resources unless a data source is used. The reason this matters is its actual behavior: Functions such as length, concat, and merge manipulate Terraform values during expression evaluation.
Incorrect Answers
A:The proposed warning belongs to for_each resource replication, which serves the different goal to create one resource instance per unique map or set key, rather than to Built-in collection function: for_each expands a resource into stable keyed instances when its collection is known at planning. The question concerns Built-in collection function acting to calculate collection values without an external provisioner, not a limit of for_each resource replication.
B:The proposed warning belongs to Template interpolation, which serves the different goal to embed evaluated expressions in a Terraform string, rather than to Built-in collection function: The ${...} syntax can interpolate an expression into a quoted string or template. The question concerns Built-in collection function acting to calculate collection values without an external provisioner, not a limit of Template interpolation.
D:The proposed warning belongs to Dynamic nested block, which serves the different goal to generate repeated nested configuration blocks from a collection, rather than to Built-in collection function: A dynamic block emits nested blocks where the enclosing resource schema permits them. The question concerns Built-in collection function acting to calculate collection values without an external provisioner, not a limit of Dynamic nested block.
Question 717
A colleague recommends the Terraform concept "Version of Git module". Which use case best matches it?
- pin a VCS module using its source ref rather than registry version
- track module release selection separately from provider lock file behavior
- constrain a module to releases with an expected interface
- update a local path module without applying registry release versioning
- select module releases meeting a declared compatibility range
Explanation
Correct Answer
A:The practical result of Version of Git module, used to pin a VCS module using its source ref rather than registry version, is: A ?ref=tag or commit in a Git module source selects the VCS revision to fetch. A qualification for this effect is: The registry module version argument does not apply to generic Git sources.
Incorrect Answers
B:That outcome applies to Module versus provider version lock, intended to track module release selection separately from provider lock file behavior, rather than the question's feature Version of Git module: Module versions are selected by module source and version settings, whereas the lock file records providers. Unlike Module versus provider version lock, Version of Git module is intended to pin a VCS module using its source ref rather than registry version, not to track module release selection separately from provider lock file behavior.
C:That outcome applies to Module release compatibility, intended to constrain a module to releases with an expected interface, rather than the question's feature Version of Git module: A version range helps avoid inadvertently selecting a module revision with breaking input or output changes. Unlike Module release compatibility, Version of Git module is intended to pin a VCS module using its source ref rather than registry version, not to constrain a module to releases with an expected interface.
D:That outcome applies to Local module development lifecycle, intended to update a local path module without applying registry release versioning, rather than the question's feature Version of Git module: Local module source code is read from its path and does not use a version argument. Unlike Local module development lifecycle, Version of Git module is intended to pin a VCS module using its source ref rather than registry version, not to update a local path module without applying registry release versioning.
E:That outcome applies to Registry module version constraint, intended to select module releases meeting a declared compatibility range, rather than the question's feature Version of Git module: A registry module call accepts a version argument that chooses supported release versions. Unlike Registry module version constraint, Version of Git module is intended to pin a VCS module using its source ref rather than registry version, not to select module releases meeting a declared compatibility range.
Question 718
During an implementation review, a Terraform team encounters "Local to HCP state migration". Which purpose is associated with that mechanism?
- move a locally managed state history into an HCP Terraform workspace
- route CLI-driven operations to the intended HCP workspace
- associate a Terraform root configuration with an HCP Terraform organization and workspace
- authenticate local Terraform CLI operations against HCP Terraform
- initiate workspace operations through familiar Terraform commands
Explanation
Correct Answer
A:The practical result of Local to HCP state migration, used to move a locally managed state history into an HCP Terraform workspace, is: Changing state integration and reinitializing can migrate state into HCP Terraform when configured correctly. A qualification for this effect is: A migration should be backed up and verified before discarding the local copy.
Incorrect Answers
B:That outcome applies to HCP Terraform workspace selection, intended to route CLI-driven operations to the intended HCP workspace, rather than the question's feature Local to HCP state migration: The cloud block workspace settings determine which HCP workspace the configuration uses. Unlike HCP Terraform workspace selection, Local to HCP state migration is intended to move a locally managed state history into an HCP Terraform workspace, not to route CLI-driven operations to the intended HCP workspace.
C:That outcome applies to cloud block HCP integration, intended to associate a Terraform root configuration with an HCP Terraform organization and workspace, rather than the question's feature Local to HCP state migration: A cloud block in terraform settings configures the HCP Terraform integration for that root module. Unlike cloud block HCP integration, Local to HCP state migration is intended to move a locally managed state history into an HCP Terraform workspace, not to associate a Terraform root configuration with an HCP Terraform organization and workspace.
D:That outcome applies to Terraform CLI login to HCP, intended to authenticate local Terraform CLI operations against HCP Terraform, rather than the question's feature Local to HCP state migration: terraform login starts an authentication workflow and stores a token for HCP Terraform access. Unlike Terraform CLI login to HCP, Local to HCP state migration is intended to move a locally managed state history into an HCP Terraform workspace, not to authenticate local Terraform CLI operations against HCP Terraform.
E:That outcome applies to CLI-driven HCP runs, intended to initiate workspace operations through familiar Terraform commands, rather than the question's feature Local to HCP state migration: HCP Terraform supports CLI-driven workflows connected to remote workspace state and operations. Unlike CLI-driven HCP runs, Local to HCP state migration is intended to move a locally managed state history into an HCP Terraform workspace, not to initiate workspace operations through familiar Terraform commands.
Question 719
A configuration walkthrough identifies "Different provider local names". Which task is it principally intended to support?
- declare several provider types in the same root module
- pass an aliased provider to resources inside a child module
- direct an individual resource to the intended aliased provider
- let a child module use default provider settings from its parent
Explanation
Correct Answer
A:The practical result of Different provider local names, used to declare several provider types in the same root module, is: The required_providers map can list multiple source addresses with distinct local names. A qualification for this effect is: Resources still use their provider-defined schemas and credentials.
Incorrect Answers
B:That outcome applies to Explicit child module provider mapping, intended to pass an aliased provider to resources inside a child module, rather than the question's feature Different provider local names: The providers map in a module block maps the child's provider name to a parent provider configuration. Unlike Explicit child module provider mapping, Different provider local names is intended to declare several provider types in the same root module, not to pass an aliased provider to resources inside a child module.
C:That outcome applies to Resource provider meta-argument, intended to direct an individual resource to the intended aliased provider, rather than the question's feature Different provider local names: The provider meta-argument can select a configured instance such as aws.west for that resource. Unlike Resource provider meta-argument, Different provider local names is intended to declare several provider types in the same root module, not to direct an individual resource to the intended aliased provider.
D:The outcome in this option belongs to Default provider configuration inheritance: Child modules commonly inherit default provider configurations from the calling module; by contrast, the feature actually named in the stem, Different provider local names, has a distinct purpose: to declare several provider types in the same root module.
Question 720
A Terraform rollout has two separate requirements: first, calculate collection values without an external provisioner; second, create one resource instance per unique map or set key. Which assignment of mechanisms correctly handles both responsibilities?
- First use Built-in collection function; then use for expression list projection.
- First use for expression list projection; then use for expression filtering.
- First use for_each resource replication; then use Built-in collection function.
- First use for expression filtering; then use for_each resource replication.
- First use Built-in collection function; then use for_each resource replication.
Explanation
Correct Answer
E:The first requirement, to calculate collection values without an external provisioner, is handled by Built-in collection function: Functions such as length, concat, and merge manipulate Terraform values during expression evaluation. The second requirement, to create one resource instance per unique map or set key, is handled by for_each resource replication: for_each expands a resource into stable keyed instances when its collection is known at planning. Each of these mechanisms has a distinct responsibility.
Incorrect Answers
A:For the requested tasks to calculate collection values without an external provisioner and create one resource instance per unique map or set key, the first candidate Built-in collection function addresses calculate collection values without an external provisioner; the second candidate for expression list projection addresses transform a collection into a list of calculated values. This mapping fails because the second mechanism primarily supports the task to transform a collection into a list of calculated values; the actual requirements are calculate collection values without an external provisioner first and create one resource instance per unique map or set key second.
B:For the requested tasks to calculate collection values without an external provisioner and create one resource instance per unique map or set key, the first candidate for expression list projection addresses transform a collection into a list of calculated values; the second candidate for expression filtering addresses include only elements satisfying an if condition in a derived collection. This mapping fails because the first mechanism primarily supports the task to transform a collection into a list of calculated values and the second mechanism primarily supports the task to include only elements satisfying an if condition in a derived collection; the actual requirements are calculate collection values without an external provisioner first and create one resource instance per unique map or set key second.
C:For the requested tasks to calculate collection values without an external provisioner and create one resource instance per unique map or set key, the first candidate for_each resource replication addresses create one resource instance per unique map or set key; the second candidate Built-in collection function addresses calculate collection values without an external provisioner. This mapping fails because the first mechanism primarily supports the task to create one resource instance per unique map or set key and the second mechanism primarily supports the task to calculate collection values without an external provisioner; the actual requirements are calculate collection values without an external provisioner first and create one resource instance per unique map or set key second.
D:For the requested tasks to calculate collection values without an external provisioner and create one resource instance per unique map or set key, the first candidate for expression filtering addresses include only elements satisfying an if condition in a derived collection; the second candidate for_each resource replication addresses create one resource instance per unique map or set key. This mapping fails because the first mechanism primarily supports the task to include only elements satisfying an if condition in a derived collection; the actual requirements are calculate collection values without an external provisioner first and create one resource instance per unique map or set key second.