Question 760
Before adopting for_each resource replication to create one resource instance per unique map or set key, which statement sets an accurate boundary?
- Interpolation is not required when an argument can take a direct expression reference.
- Keys cannot be unknown or derived directly from sensitive values.
- Dynamic cannot generate resource or provider blocks at the root level.
- A for expression calculates values but does not itself create resource instances.
Explanation
Correct Answer
B:For for_each resource replication in the task to create one resource instance per unique map or set key, the important caution is: Keys cannot be unknown or derived directly from sensitive values. The reason this matters is its actual behavior: for_each expands a resource into stable keyed instances when its collection is known at planning.
Incorrect Answers
A:The proposed warning belongs to Template interpolation, which serves the different goal to embed evaluated expressions in a Terraform string, rather than to for_each resource replication: The ${...} syntax can interpolate an expression into a quoted string or template. The question concerns for_each resource replication acting to create one resource instance per unique map or set key, not a limit of Template interpolation.
C: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 for_each resource replication: A dynamic block emits nested blocks where the enclosing resource schema permits them. The question concerns for_each resource replication acting to create one resource instance per unique map or set key, not a limit of Dynamic nested block.
D:The listed caution belongs specifically to for expression list projection, used to transform a collection into a list of calculated values: A bracketed for expression maps each element to a new value using a declared iterator; the feature under review is instead for_each resource replication, so this answer attaches another feature's qualification to the wrong mechanism.
Question 761
The implementation must both update a local path module without applying registry release versioning and track module release selection separately from provider lock file behavior. Which TWO mechanisms directly address these two separate requirements? Choose TWO.
- Registry module version constraint
- Module versus provider version lock
- Local module development lifecycle
- Module upgrade through init
- Exact registry module version
Explanation
Correct Answers
B:Among the paired tasks to update a local path module without applying registry release versioning and track module release selection separately from provider lock file behavior, Module versus provider version lock serves the requirement to track module release selection separately from provider lock file behavior: Module versions are selected by module source and version settings, whereas the lock file records providers. The other task must be covered by a separate mechanism.
C:Among the paired tasks to update a local path module without applying registry release versioning and track module release selection separately from provider lock file behavior, Local module development lifecycle serves the requirement to update a local path module without applying registry release versioning: Local module source code is read from its path and does not use a version argument. The other task must be covered by a separate mechanism.
Incorrect Answers
A:The requirements are update a local path module without applying registry release versioning and track module release selection separately from provider lock file behavior, while Registry module version constraint supports the different task to select module releases meeting a declared compatibility range: A registry module call accepts a version argument that chooses supported release versions. That capability is outside the two selected responsibilities.
D:The requirements are update a local path module without applying registry release versioning and track module release selection separately from provider lock file behavior, while Module upgrade through init supports the different task to fetch a newly allowed version after editing the module version requirement: Rerunning terraform init downloads compatible module source versions when module requirements change. That capability is outside the two selected responsibilities.
E:The requirements are update a local path module without applying registry release versioning and track module release selection separately from provider lock file behavior, while Exact registry module version supports the different task to make a published module dependency deterministic across clean installs: An exact version requirement identifies one registry module release. That capability is outside the two selected responsibilities.
Question 762
A Terraform rollout has two separate requirements: first, initiate workspace operations through familiar Terraform commands; second, provide Terraform and environment variables to a hosted run. Which assignment of mechanisms correctly handles both responsibilities?
- First use CLI-driven HCP runs; then use HCP Terraform workspace variable configuration.
- First use Terraform CLI login to HCP; then use cloud block HCP integration.
- First use CLI-driven HCP runs; then use Terraform CLI login to HCP.
- First use HCP Terraform workspace variable configuration; then use CLI-driven HCP runs.
- First use cloud block HCP integration; then use HCP Terraform workspace variable configuration.
Explanation
Correct Answer
A:The first requirement, to initiate workspace operations through familiar Terraform commands, is handled by CLI-driven HCP runs: HCP Terraform supports CLI-driven workflows connected to remote workspace state and operations. The second requirement, to provide Terraform and environment variables to a hosted run, is handled by HCP Terraform workspace variable configuration: Workspace variables and variable sets can supply inputs or environment settings to HCP Terraform operations. Each of these mechanisms has a distinct responsibility.
Incorrect Answers
B:For the requested tasks to initiate workspace operations through familiar Terraform commands and provide Terraform and environment variables to a hosted run, the first candidate Terraform CLI login to HCP addresses authenticate local Terraform CLI operations against HCP Terraform; the second candidate cloud block HCP integration addresses associate a Terraform root configuration with an HCP Terraform organization and workspace. This mapping fails because the first mechanism primarily supports the task to authenticate local Terraform CLI operations against HCP Terraform and the second mechanism primarily supports the task to associate a Terraform root configuration with an HCP Terraform organization and workspace; the actual requirements are initiate workspace operations through familiar Terraform commands first and provide Terraform and environment variables to a hosted run second.
C:For the requested tasks to initiate workspace operations through familiar Terraform commands and provide Terraform and environment variables to a hosted run, the first candidate CLI-driven HCP runs addresses initiate workspace operations through familiar Terraform commands; the second candidate Terraform CLI login to HCP addresses authenticate local Terraform CLI operations against HCP Terraform. This mapping fails because the second mechanism primarily supports the task to authenticate local Terraform CLI operations against HCP Terraform; the actual requirements are initiate workspace operations through familiar Terraform commands first and provide Terraform and environment variables to a hosted run second.
D:For the requested tasks to initiate workspace operations through familiar Terraform commands and provide Terraform and environment variables to a hosted run, the first candidate HCP Terraform workspace variable configuration addresses provide Terraform and environment variables to a hosted run; the second candidate CLI-driven HCP runs addresses initiate workspace operations through familiar Terraform commands. 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 initiate workspace operations through familiar Terraform commands; the actual requirements are initiate workspace operations through familiar Terraform commands first and provide Terraform and environment variables to a hosted run second.
E:For the requested tasks to initiate workspace operations through familiar Terraform commands and provide Terraform and environment variables to a hosted run, the first candidate cloud block HCP integration addresses associate a Terraform root configuration with an HCP Terraform organization and workspace; the second candidate HCP Terraform workspace variable configuration addresses provide Terraform and environment variables to a hosted run. This mapping fails because the first mechanism primarily supports the task to associate a Terraform root configuration with an HCP Terraform organization and workspace; the actual requirements are initiate workspace operations through familiar Terraform commands first and provide Terraform and environment variables to a hosted run second.
Question 763
A Terraform runbook describes the mechanism "Explicit child module provider mapping". Which responsibility should a reviewer associate with it?
- pass an aliased provider to resources inside a child module
- configure a second instance of the same provider for another account or region
- create similar resources in different regions without duplicating the root module
- let a child module use default provider settings from its parent
- refer to a provider configuration by its local name and alias
Explanation
Correct Answer
A:The practical result of Explicit child module provider mapping, used to pass an aliased provider to resources inside a child module, is: The providers map in a module block maps the child's provider name to a parent provider configuration. A qualification for this effect is: A child module cannot automatically see every parent alias just because it exists.
Incorrect Answers
B:That outcome applies to Aliased provider instance, intended to configure a second instance of the same provider for another account or region, rather than the question's feature Explicit child module provider mapping: The alias argument gives a provider configuration an additional address that resources can select. Unlike Aliased provider instance, Explicit child module provider mapping is intended to pass an aliased provider to resources inside a child module, not to configure a second instance of the same provider for another account or region.
C:That outcome applies to Multiple regions in one configuration, intended to create similar resources in different regions without duplicating the root module, rather than the question's feature Explicit child module provider mapping: Two provider instances with different region settings can serve explicitly assigned resources or modules. Unlike Multiple regions in one configuration, Explicit child module provider mapping is intended to pass an aliased provider to resources inside a child module, not to create similar resources in different regions without duplicating the root module.
D:That outcome applies to Default provider configuration inheritance, intended to let a child module use default provider settings from its parent, rather than the question's feature Explicit child module provider mapping: Child modules commonly inherit default provider configurations from the calling module. Unlike Default provider configuration inheritance, Explicit child module provider mapping is intended to pass an aliased provider to resources inside a child module, not to let a child module use default provider settings from its parent.
E:That outcome applies to Provider alias reference address, intended to refer to a provider configuration by its local name and alias, rather than the question's feature Explicit child module provider mapping: An address such as aws.audit identifies a specific configured instance of the aws provider. Unlike Provider alias reference address, Explicit child module provider mapping is intended to pass an aliased provider to resources inside a child module, not to refer to a provider configuration by its local name and alias.
Question 764
A technical review has three distinct objectives: create one resource instance per unique map or set key; include only elements satisfying an if condition in a derived collection; and embed evaluated expressions in a Terraform string. Which THREE mechanisms should the team identify for these respective needs? Choose THREE.
- for_each resource replication
- for expression list projection
- Conditional expression
- Template interpolation
- for expression filtering
Explanation
Correct Answers
A:In the workflow combining create one resource instance per unique map or set key, include only elements satisfying an if condition in a derived collection, and embed evaluated expressions in a Terraform string, for_each resource replication correctly addresses the individual goal to create one resource instance per unique map or set key: for_each expands a resource into stable keyed instances when its collection is known at planning. It is one of three separately required capabilities.
D:In the workflow combining create one resource instance per unique map or set key, include only elements satisfying an if condition in a derived collection, and embed evaluated expressions in a Terraform string, Template interpolation correctly addresses the individual goal to embed evaluated expressions in a Terraform string: The ${...} syntax can interpolate an expression into a quoted string or template. It is one of three separately required capabilities.
E:In the workflow combining create one resource instance per unique map or set key, include only elements satisfying an if condition in a derived collection, and embed evaluated expressions in a Terraform string, for expression filtering correctly addresses the individual goal to include only elements satisfying an if condition in a derived collection: A for expression's optional if clause filters elements while projecting results. It is one of three separately required capabilities.
Incorrect Answers
B:Compared with the three tasks to create one resource instance per unique map or set key, include only elements satisfying an if condition in a derived collection, and embed evaluated expressions in a Terraform string, for expression list projection primarily supports an unrelated request to transform a collection into a list of calculated values: A bracketed for expression maps each element to a new value using a declared iterator. Therefore this option is not among the three specified mechanisms.
C:Compared with the three tasks to create one resource instance per unique map or set key, include only elements satisfying an if condition in a derived collection, and embed evaluated expressions in a Terraform string, Conditional expression primarily supports an unrelated request to choose between two values based on a boolean condition: Terraform's condition ? true_value : false_value expression selects a value based on a predicate. Therefore this option is not among the three specified mechanisms.
Question 765
A deployment design calls for a supported way to convert a saved plan into JSON for automated analysis. Which mechanism most directly meets this particular need?
- Plan saved to file
- Targeted planning
- Machine-readable plan inspection
- terraform plan command
- Plan without state refresh
- Refresh-only planning
Explanation
Correct Answer
C:The task is to convert a saved plan into JSON for automated analysis; Machine-readable plan inspection directly supports that requirement: terraform show -json change.tfplan exposes plan details for tooling. Its relevant boundary is: The JSON can expose secrets and requires secure handling.
Incorrect Answers
A:Plan saved to file is designed to capture one execution plan for later approval and application, whereas this task is to convert a saved plan into JSON for automated analysis: terraform plan -out=change.tfplan saves an executable binary plan artifact. Against Machine-readable plan inspection, its limitation is: Saved plans can include sensitive data and should not be committed publicly.
B:Targeted planning is designed to focus on a small subset for exceptional repair or troubleshooting, whereas this task is to convert a saved plan into JSON for automated analysis: terraform plan -target=ADDRESS limits the planner's focus to the selected graph portion. Against Machine-readable plan inspection, its limitation is: Routine targeted planning can overlook intended changes elsewhere.
D:terraform plan command is designed to preview actions required to reach the declared infrastructure state, whereas this task is to convert a saved plan into JSON for automated analysis: terraform plan shows changes Terraform expects, including creates, updates, deletes, and replacements. Against Machine-readable plan inspection, its limitation is: Plan does not persist the proposed changes to remote infrastructure.
E:Plan without state refresh is designed to avoid remote refresh reads when an intentional troubleshooting constraint requires it, whereas this task is to convert a saved plan into JSON for automated analysis: terraform plan -refresh=false uses existing state without refreshing live objects before planning. Against Machine-readable plan inspection, its limitation is: A plan based on stale state can be inaccurate about real infrastructure.
F:Refresh-only planning is designed to inspect externally changed infrastructure without planning configuration reconciliation, whereas this task is to convert a saved plan into JSON for automated analysis: terraform plan -refresh-only proposes updates to state and outputs based on remote observations. Against Machine-readable plan inspection, its limitation is: It does not use configuration to correct drift in the remote service.
Question 766
An engineer must update an existing Terraform workflow to change a resource state address to match a configuration refactor. Which mechanism most directly meets this particular need?
- Drift reconciliation to configuration
- removed block with destroy=false
- terraform state rm
- terraform state mv
Explanation
Correct Answer
D:The task is to change a resource state address to match a configuration refactor; terraform state mv directly supports that requirement: state mv rebinds an existing object under a new compatible address. Its relevant boundary is: It does not rename or migrate the remote object through its provider API.
Incorrect Answers
A:Drift reconciliation to configuration is designed to restore externally modified resource settings to desired code values, whereas this task is to change a resource state address to match a configuration refactor: A regular plan and apply can propose changing a drifted object back to configured settings. Against terraform state mv, its limitation is: A refresh-only apply instead accepts observed remote values into state.
B:removed block with destroy=false is designed to stop tracking an object in state but deliberately leave it deployed, whereas this task is to change a resource state address to match a configuration refactor: A removed block declares that Terraform should forget a resource without deleting it when destroy=false. Against terraform state mv, its limitation is: Ordinary resource removal from HCL can instead lead to destruction.
C:terraform state rm is designed to detach a resource address from state while leaving the remote object intact, whereas this task is to change a resource state address to match a configuration refactor: state rm forgets the binding but does not delete the real infrastructure object. Against terraform state mv, its limitation is: If its configuration remains, a later plan can propose creating another object.
Question 767
An operator chooses the mechanism "Provider-specific implementation" for a Terraform project. Which outcome should this choice support?
- control DNS, SaaS, and cloud resources through a common configuration tool
- manage different clouds from one Terraform root module
- configure cloud and on-premises platforms through a common workflow
- use a common language without pretending providers expose identical capabilities
- use output from one service to configure another supported service
Explanation
Correct Answer
D:The practical result of Provider-specific implementation, used to use a common language without pretending providers expose identical capabilities, is: HCL and workflow are common while each provider defines its own resource schema and service-specific behavior. A qualification for this effect is: A resource type from one provider cannot be substituted blindly for another.
Incorrect Answers
A:That outcome applies to Service-agnostic orchestration, intended to control DNS, SaaS, and cloud resources through a common configuration tool, rather than the question's feature Provider-specific implementation: Terraform providers expose resource and data types beyond infrastructure hosted by a cloud vendor. Unlike Service-agnostic orchestration, Provider-specific implementation is intended to use a common language without pretending providers expose identical capabilities, not to control DNS, SaaS, and cloud resources through a common configuration tool.
B:That outcome applies to Multi-cloud provider configuration, intended to manage different clouds from one Terraform root module, rather than the question's feature Provider-specific implementation: Separate provider plugins can reconcile resources on multiple platforms within the same configuration. Unlike Multi-cloud provider configuration, Provider-specific implementation is intended to use a common language without pretending providers expose identical capabilities, not to manage different clouds from one Terraform root module.
C:That outcome applies to Hybrid infrastructure automation, intended to configure cloud and on-premises platforms through a common workflow, rather than the question's feature Provider-specific implementation: Terraform can coordinate providers for hosted services and private infrastructure without imposing one cloud API. Unlike Hybrid infrastructure automation, Provider-specific implementation is intended to use a common language without pretending providers expose identical capabilities, not to configure cloud and on-premises platforms through a common workflow.
E:That outcome applies to Cross-platform dependency references, intended to use output from one service to configure another supported service, rather than the question's feature Provider-specific implementation: References can establish ordering when a resource on one platform consumes attributes from another resource. Unlike Cross-platform dependency references, Provider-specific implementation is intended to use a common language without pretending providers expose identical capabilities, not to use output from one service to configure another supported service.
Question 768
During a Terraform 1.12 implementation, the immediate requirement is to constrain a module to releases with an expected interface. Which mechanism most directly meets this particular need?
- Local module development lifecycle
- Module versus provider version lock
- Registry module version constraint
- Module release compatibility
Explanation
Correct Answer
D:The task is to constrain a module to releases with an expected interface; Module release compatibility directly supports that requirement: A version range helps avoid inadvertently selecting a module revision with breaking input or output changes. Its relevant boundary is: Version constraints cannot guarantee every patch release is defect-free.
Incorrect Answers
A:Local module development lifecycle is designed to update a local path module without applying registry release versioning, whereas this task is to constrain a module to releases with an expected interface: Local module source code is read from its path and does not use a version argument. Against Module release compatibility, its limitation is: A local edit can still change the next plan and should be reviewed.
B:Module versus provider version lock is designed to track module release selection separately from provider lock file behavior, whereas this task is to constrain a module to releases with an expected interface: Module versions are selected by module source and version settings, whereas the lock file records providers. Against Module release compatibility, its limitation is: Assuming .terraform.lock.hcl freezes registry modules can surprise a new installation.
C:Registry module version constraint addresses the different requirement to select module releases meeting a declared compatibility range: A registry module call accepts a version argument that chooses supported release versions; this does not by itself satisfy the requested task to constrain a module to releases with an expected interface. For the stated need, Module release compatibility is the more direct mechanism.
Question 769
For a new infrastructure repository, the team wants to control the Terraform version used for remote runs. Which mechanism most directly meets this particular need?
- Terraform CLI login to HCP
- HCP Terraform workspace version settings
- HCP Terraform workspace selection
- cloud block HCP integration
Explanation
Correct Answer
B:The task is to control the Terraform version used for remote runs; HCP Terraform workspace version settings directly supports that requirement: Workspace settings can select the Terraform Core version used in HCP remote execution. Its relevant boundary is: Provider version constraints remain a separate configuration concern.
Incorrect Answers
A:Terraform CLI login to HCP is designed to authenticate local Terraform CLI operations against HCP Terraform, whereas this task is to control the Terraform version used for remote runs: terraform login starts an authentication workflow and stores a token for HCP Terraform access. Against HCP Terraform workspace version settings, its limitation is: A CLI token is not a cloud provider's deployment credential.
C:HCP Terraform workspace selection is designed to route CLI-driven operations to the intended HCP workspace, whereas this task is to control the Terraform version used for remote runs: The cloud block workspace settings determine which HCP workspace the configuration uses. Against HCP Terraform workspace version settings, its limitation is: Selecting the wrong workspace can target a different infrastructure state.
D:cloud block HCP integration is designed to associate a Terraform root configuration with an HCP Terraform organization and workspace, whereas this task is to control the Terraform version used for remote runs: A cloud block in terraform settings configures the HCP Terraform integration for that root module. Against HCP Terraform workspace version settings, its limitation is: It should not be combined with a separate backend block in the same root configuration.
Question 770
An operator chooses the mechanism "TF_LOG_PROVIDER environment variable" for a Terraform project. Which outcome should this choice support?
- write Terraform debug logging to a named file
- capture highly detailed events for a stubborn Terraform problem
- focus verbose diagnostics on provider-side activity
- focus debugging on Terraform Core behavior rather than provider messages
- enable Terraform debugging output while investigating a CLI failure
Explanation
Correct Answer
C:The practical result of TF_LOG_PROVIDER environment variable, used to focus verbose diagnostics on provider-side activity, is: TF_LOG_PROVIDER controls the provider logging level to aid plugin or API troubleshooting. A qualification for this effect is: Provider logs may reveal credentials or request data and require caution.
Incorrect Answers
A:That outcome applies to TF_LOG_PATH environment variable, intended to write Terraform debug logging to a named file, rather than the question's feature TF_LOG_PROVIDER environment variable: TF_LOG_PATH controls a file destination for Terraform logging when logging is enabled. Unlike TF_LOG_PATH environment variable, TF_LOG_PROVIDER environment variable is intended to focus verbose diagnostics on provider-side activity, not to write Terraform debug logging to a named file.
B:That outcome applies to TRACE diagnostic level, intended to capture highly detailed events for a stubborn Terraform problem, rather than the question's feature TF_LOG_PROVIDER environment variable: TRACE is a very verbose Terraform logging level useful for deep troubleshooting. Unlike TRACE diagnostic level, TF_LOG_PROVIDER environment variable is intended to focus verbose diagnostics on provider-side activity, not to capture highly detailed events for a stubborn Terraform problem.
D:That outcome applies to TF_LOG_CORE environment variable, intended to focus debugging on Terraform Core behavior rather than provider messages, rather than the question's feature TF_LOG_PROVIDER environment variable: TF_LOG_CORE can set logging for Terraform Core separately from provider plugin output. Unlike TF_LOG_CORE environment variable, TF_LOG_PROVIDER environment variable is intended to focus verbose diagnostics on provider-side activity, not to focus debugging on Terraform Core behavior rather than provider messages.
E:That outcome applies to TF_LOG environment variable, intended to enable Terraform debugging output while investigating a CLI failure, rather than the question's feature TF_LOG_PROVIDER environment variable: TF_LOG sets a supported logging level such as DEBUG or TRACE for a Terraform process. Unlike TF_LOG environment variable, TF_LOG_PROVIDER environment variable is intended to focus verbose diagnostics on provider-side activity, not to enable Terraform debugging output while investigating a CLI failure.