Question 820
A change request asks an engineer to display configuration and state dependencies for troubleshooting. Which choice best implements the requested behavior?
- terraform graph
- terraform plan -refresh=false
- terraform plan -refresh-only
- terraform show on a plan file
- A resource action marked minus
Explanation
Correct Answer
A:The graph command emits a DOT graph representation of Terraform dependencies, useful for spotting unexpected ordering constraints; this directly meets the requirement to display configuration and state dependencies for troubleshooting. By comparison, a resource action marked minus is intended to interpret a plan showing a resource that Terraform will destroy, which is a different task from display configuration and state dependencies for troubleshooting.
Incorrect Answers
B:Disabling refresh reduces remote reads but can hide drift and produce an inaccurate plan based on stale observations; this mechanism is useful when the job is to skip routine state refresh for a constrained preview, whereas the current scenario requires the engineer to display configuration and state dependencies for troubleshooting. These operations have different effects in the stated Terraform workflow.
C:Refresh-only planning proposes changes to Terraform state or root outputs based on remote observations, without proposing ordinary resource updates; this mechanism is useful when the job is to propose updating state or root outputs to reflect remote changes without planning infrastructure remediation, whereas the current scenario requires the engineer to display configuration and state dependencies for troubleshooting. These operations have different effects in the stated Terraform workflow.
D:terraform show can display a saved plan's actions and attributes; sensitive material may appear in machine-readable forms; this mechanism is useful when the job is to inspect the human-readable contents of a saved Terraform plan, whereas the current scenario requires the engineer to display configuration and state dependencies for troubleshooting. These operations have different effects in the stated Terraform workflow.
E:In human-readable plans, - denotes a planned destruction of a managed resource; this mechanism is useful when the job is to interpret a plan showing a resource that Terraform will destroy, whereas the current scenario requires the engineer to display configuration and state dependencies for troubleshooting. These operations have different effects in the stated Terraform workflow.
Question 821
A collaboration and governance review requires a way to categorize HCP Terraform workspaces for filtering or configuration selection. Which Terraform approach most directly fulfills that request?
- Workspace tags
- Project-scoped team access
- One state per independently owned system
- HCP Terraform run triggers between workspaces
Explanation
Correct Answer
A:Workspace tags help group and select workspaces, including when a CLI cloud block targets tagged workspace sets; this directly meets the requirement to categorize HCP Terraform workspaces for filtering or configuration selection. By comparison, HCP Terraform run triggers between workspaces is intended to coordinate a dependent app deployment following an upstream network workspace apply, which is a different task from categorize HCP Terraform workspaces for filtering or configuration selection.
Incorrect Answers
B:Project-level access scopes workspace capabilities for teams based on organizational boundaries; this mechanism is useful when the job is to delegate administration of one team's project without granting universal organization access, whereas the current scenario requires the engineer to categorize HCP Terraform workspaces for filtering or configuration selection. These operations have different effects in the stated Terraform workflow.
C:Separate workspaces allow independent state lifecycles for services that are changed and approved separately; this mechanism is useful when the job is to avoid coupling different teams' deploys into a single state and blast radius, whereas the current scenario requires the engineer to categorize HCP Terraform workspaces for filtering or configuration selection. These operations have different effects in the stated Terraform workflow.
D:A run trigger can initiate a downstream plan when its designated upstream workspace completes the relevant run; this mechanism is useful when the job is to coordinate a dependent app deployment following an upstream network workspace apply, whereas the current scenario requires the engineer to categorize HCP Terraform workspaces for filtering or configuration selection. These operations have different effects in the stated Terraform workflow.
Question 822
A Terraform reviewer encounters “Code review of infrastructure” while assessing how to catch undesirable configuration changes before deployment. Which statement correctly describes its actual behavior?
- A backend supporting remote storage and locking can centralize state and prevent conflicting concurrent changes.
- Terraform input variables permit different values for capacity, names and endpoints without copying the entire resource definition.
- A Terraform plan is a reviewable proposed set of actions; execution occurs only when an apply runs against the chosen plan.
- A version-control pull request can expose infrastructure edits to peer review, policy checks and automated validation.
Explanation
Correct Answer
D:The named mechanism is used when the objective is to catch undesirable configuration changes before deployment, so it produces the behavior described. In contrast, environment parametrization serves a different goal: deploy similarly structured stacks with environment-specific settings, not catch undesirable configuration changes before deployment.
Incorrect Answers
A:The description applies to collaboration through remote state when an engineer needs to allow authorized operators to use one shared source of Terraform state; the named code review of infrastructure instead handles the requirement to catch undesirable configuration changes before deployment, so this behavior does not describe Code review of infrastructure in the situation named.
B:The description applies to environment parametrization when an engineer needs to deploy similarly structured stacks with environment-specific settings; the named code review of infrastructure instead handles the requirement to catch undesirable configuration changes before deployment, so this behavior does not describe Code review of infrastructure in the situation named.
C:The description applies to plan-before-apply reviews when an engineer needs to see intended infrastructure changes without immediately creating them; the named code review of infrastructure instead handles the requirement to catch undesirable configuration changes before deployment, so this behavior does not describe Code review of infrastructure in the situation named.
Question 823
During a design review, the requirement is to avoid hand-sequencing every resource operation. Which option should the engineer select?
- Reusable execution records
- Consistent dependency management
- Policy checks before provisioning
- Idempotent convergence
Explanation
Correct Answer
B:Terraform infers many dependencies from references and applies graph ordering to create or modify related resources safely; this directly meets the requirement to avoid hand-sequencing every resource operation. By comparison, reusable execution records is intended to audit the results of infrastructure changes across a team, which is a different task from avoid hand-sequencing every resource operation.
Incorrect Answers
A:Version control and run history provide traceable context for what configuration changed and what Terraform planned or applied; this mechanism is useful when the job is to audit the results of infrastructure changes across a team, whereas the current scenario requires the engineer to avoid hand-sequencing every resource operation. These operations have different effects in the stated Terraform workflow.
C:A policy or governance stage can inspect proposed infrastructure changes before allowing an apply to proceed; this mechanism is useful when the job is to enforce organizational infrastructure constraints consistently, whereas the current scenario requires the engineer to avoid hand-sequencing every resource operation. These operations have different effects in the stated Terraform workflow.
D:With no configuration or remote drift requiring action, a new plan normally proposes no infrastructure changes; this mechanism is useful when the job is to run unchanged configuration repeatedly without inventing new infrastructure updates, whereas the current scenario requires the engineer to avoid hand-sequencing every resource operation. These operations have different effects in the stated Terraform workflow.
Question 824
During a design review, the requirement is to delay the visibility of an output until additional required operations finish. Which option should the engineer select?
- Output dependency metadata
- Explicit depends_on
- count.index
- A for_each instance address
Explanation
Correct Answer
A:An output block can use depends_on for dependencies that are not evident from its value expression; this directly meets the requirement to delay the visibility of an output until additional required operations finish. By comparison, count.index is intended to build a numbered name for each instance created using count, which is a different task from delay the visibility of an output until additional required operations finish.
Incorrect Answers
B:The depends_on meta-argument adds dependency edges for a known relationship that Terraform cannot otherwise infer; this mechanism is useful when the job is to order resources when there is a dependency not expressed by attribute references, whereas the current scenario requires the engineer to delay the visibility of an output until additional required operations finish. These operations have different effects in the stated Terraform workflow.
C:Resources using count can refer to the current instance number through count.index, a zero-based integer; this mechanism is useful when the job is to build a numbered name for each instance created using count, whereas the current scenario requires the engineer to delay the visibility of an output until additional required operations finish. These operations have different effects in the stated Terraform workflow.
D:Instances made from a map or string set have addresses such as aws_instance.web["blue"], rather than an integer count index; this mechanism is useful when the job is to identify a single managed object selected by a string key, whereas the current scenario requires the engineer to delay the visibility of an output until additional required operations finish. These operations have different effects in the stated Terraform workflow.
Question 825
An engineer proposes “Remote backend access permissions” to use multiple logical state namespaces when the backend implementation supports it. Which outcome does the proposed technique actually provide?
- Backend configuration is processed at initialization, before ordinary input expressions are evaluated, so it cannot use regular variables or locals.
- The reconfigure flag discards cached previous backend settings and does not copy the prior state snapshot.
- Workspace support depends on the selected backend, and each workspace tracks its own state snapshot.
- Cloud storage policy and backend authorization decide who can obtain or mutate stored Terraform state; provider credentials alone are not sufficient.
Explanation
Correct Answer
D:Remote backend access permissions is used when an operator needs to enforce read and write privileges on the state object. Consequently, this choice cannot meet the separate requirement to use multiple logical state namespaces when the backend implementation supports it. The intended action would instead require Remote backend support for workspaces.
Incorrect Answers
A:This behavior belongs to No input variable interpolation in a backend block, which helps engineers avoid expecting var.region or local.name to populate backend settings rather than satisfying the separate requirement to use multiple logical state namespaces when the backend implementation supports it. The attempted technique was Remote backend access permissions; it would instead be used to enforce read and write privileges on the state object, not to produce the effect associated with No input variable interpolation in a backend block.
B:This behavior belongs to terraform init -reconfigure, which helps engineers switch backend settings without performing automatic state migration rather than satisfying the separate requirement to use multiple logical state namespaces when the backend implementation supports it. The attempted technique was Remote backend access permissions; it would instead be used to enforce read and write privileges on the state object, not to produce the effect associated with terraform init -reconfigure.
C:That outcome belongs to Remote backend support for workspaces, the mechanism that can use multiple logical state namespaces when the backend implementation supports it. The question concerns the engineer’s actual proposal, Remote backend access permissions; it is directed at enforce read and write privileges on the state object, not that result.
Question 826
The team evaluates “Remove from state without deletion” for a requirement to stop managing an existing object while preserving the real remote infrastructure. Which observed behavior belongs to that mechanism rather than a different Terraform feature?
- The destroy command plans and applies removal of managed objects subject to lifecycle and provider constraints.
- The lifecycle prevent_destroy setting rejects a plan that destroys or replaces a configured resource while the rule remains present.
- The destroy mode tells apply to plan removal of managed resources rather than ordinary convergence to resource declarations.
- Removing a state association, for example with terraform state rm, makes Terraform forget the object without asking the provider to delete it.
- Terraform generally reverses dependency order when destroying managed resources so dependent objects are removed first.
Explanation
Correct Answer
D:The named mechanism is used when the objective is to stop managing an existing object while preserving the real remote infrastructure, so it produces the behavior described. In contrast, terraform apply -destroy serves a different goal: execute a destroy-mode apply within a controlled workflow, not stop managing an existing object while preserving the real remote infrastructure.
Incorrect Answers
A:The description applies to terraform destroy when an engineer needs to remove the managed infrastructure described by the current Terraform configuration; the named remove from state without deletion instead handles the requirement to stop managing an existing object while preserving the real remote infrastructure, so this behavior does not describe Remove from state without deletion in the situation named.
B:The description applies to an explicit prevent_destroy rule when an engineer needs to block a destructive plan for a protected configured resource; the named remove from state without deletion instead handles the requirement to stop managing an existing object while preserving the real remote infrastructure, so this behavior does not describe Remove from state without deletion in the situation named.
C:The description applies to terraform apply -destroy when an engineer needs to execute a destroy-mode apply within a controlled workflow; the named remove from state without deletion instead handles the requirement to stop managing an existing object while preserving the real remote infrastructure, so this behavior does not describe Remove from state without deletion in the situation named.
E:The description applies to dependency-aware deletion when an engineer needs to remove dependent resources before objects they rely on; the named remove from state without deletion instead handles the requirement to stop managing an existing object while preserving the real remote infrastructure, so this behavior does not describe Remove from state without deletion in the situation named.
Question 827
An output block uses the value expression max(2, 9, 4). Assuming only the literal data shown, which result should be expected?
- 2
- 4
- 9
- 15
Explanation
Correct Answer
C:The expression max(2, 9, 4) evaluates to 9 because max selects the largest of the supplied numeric arguments. This is Terraform's direct evaluation of the supplied literal arguments in max(2, 9, 4), not an external provider lookup.
Incorrect Answers
A:Two is the minimum in this set, not the maximum. In this specific evaluation, max selects the largest of the supplied numeric arguments, which rules out the proposed alternative.
B:Four is lower than the supplied nine. For max(2, 9, 4), max selects the largest of the supplied numeric arguments; consequently this candidate is not the value Terraform computes.
D:Max does not add arguments together. HCL evaluates max(2, 9, 4) using the supplied arguments: max selects the largest of the supplied numeric arguments; the listed result is therefore incorrect.
Question 828
During one infrastructure delivery, the team must satisfy all of the following: (1) evaluate HCL expressions and calculate a resource dependency graph; (2) restrict the Terraform CLI version rather than a provider plugin. Select TWO appropriate Terraform approaches. Choose TWO.
- Terraform Core
- terraform init -upgrade
- Provider aliases
- The dependency lock file
- The provider registry namespace
- The required_version setting
Explanation
Correct Answers
A:Terraform Core handles language evaluation, planning and state orchestration while provider plugins execute service-specific operations; this meets the requirement to evaluate HCL expressions and calculate a resource dependency graph, while the other selected techniques address restrict the Terraform CLI version rather than a provider plugin, which require their own distinct Terraform mechanisms.
F:The terraform block's required_version expression constrains which Terraform executable can operate on the configuration; this meets the requirement to restrict the Terraform CLI version rather than a provider plugin, while the other selected techniques address evaluate HCL expressions and calculate a resource dependency graph, which require their own distinct Terraform mechanisms.
Incorrect Answers
B:The -upgrade switch permits newer versions that satisfy constraints instead of preserving current installed or locked selections; it addresses intentionally reconsider previously locked provider and module selections, but this delivery instead requires evaluate HCL expressions and calculate a resource dependency graph and restrict the Terraform CLI version rather than a provider plugin. The required combination involves The required_version setting and Terraform Core, not the behavior of terraform init -upgrade.
C:A provider configuration with alias defines a named alternate that resources or modules can explicitly select; it addresses configure two connections to the same service for different regions or accounts, but this delivery instead requires evaluate HCL expressions and calculate a resource dependency graph and restrict the Terraform CLI version rather than a provider plugin. The required combination involves The required_version setting and Terraform Core, not the behavior of Provider aliases.
D:The .terraform.lock.hcl file records selected provider versions and checksums to constrain subsequent installations; it addresses reproduce previously selected provider package versions on other machines, but this delivery instead requires evaluate HCL expressions and calculate a resource dependency graph and restrict the Terraform CLI version rather than a provider plugin. The required combination involves The required_version setting and Terraform Core, not the behavior of The dependency lock file.
E:The namespace portion of a source address separates provider publishers in the registry; it addresses identify the publisher when providers share a type name, but this delivery instead requires evaluate HCL expressions and calculate a resource dependency graph and restrict the Terraform CLI version rather than a provider plugin. The required combination involves The required_version setting and Terraform Core, not the behavior of The provider registry namespace.
Question 829
An engineer proposes “A separate module repository” to fetch module code directly from a remote Git repository. Which outcome does the proposed technique actually provide?
- A git::https:// source can retrieve a Terraform module from version control rather than from the module registry.
- Terraform can load a module from a local filesystem path, though absolute paths make configurations less portable.
- Initialization retrieves module sources and populates .terraform/modules while preparing other required dependencies.
- Keeping reusable child modules separately versioned allows independent adoption and maintenance by different Terraform root modules.
Explanation
Correct Answer
D:A separate module repository is used when an operator needs to share reusable Terraform configuration with multiple root projects. Consequently, this choice cannot meet the separate requirement to fetch module code directly from a remote Git repository. The intended action would instead require A Git HTTPS module source.
Incorrect Answers
A:That outcome belongs to A Git HTTPS module source, the mechanism that can fetch module code directly from a remote Git repository. The question concerns the engineer’s actual proposal, A separate module repository; it is directed at share reusable Terraform configuration with multiple root projects, not that result.
B:This behavior belongs to An absolute local module source, which helps engineers call a child module from an explicit filesystem path rather than satisfying the separate requirement to fetch module code directly from a remote Git repository. The attempted technique was A separate module repository; it would instead be used to share reusable Terraform configuration with multiple root projects, not to produce the effect associated with An absolute local module source.
C:This behavior belongs to terraform init for modules, which helps engineers install all referenced remote child modules before planning rather than satisfying the separate requirement to fetch module code directly from a remote Git repository. The attempted technique was A separate module repository; it would instead be used to share reusable Terraform configuration with multiple root projects, not to produce the effect associated with terraform init for modules.
Question 830
An engineering checklist calls for separate outcomes: (1) use a common configuration workflow across distinct vendors; (2) avoid hand-sequencing every resource operation; (3) describe the desired infrastructure state instead of scripting every API step. Which THREE options implement the requested outcomes? Choose THREE.
- Repeatable environment definition
- Reusable execution records
- Consistent dependency management
- Service-agnostic resource modeling
- Consistent automation pipeline
- Declarative resource configuration
Explanation
Correct Answers
C:Terraform infers many dependencies from references and applies graph ordering to create or modify related resources safely; this meets the requirement to avoid hand-sequencing every resource operation, while the other selected techniques address use a common configuration workflow across distinct vendors and describe the desired infrastructure state instead of scripting every API step, which require their own distinct Terraform mechanisms.
D:Terraform Core offers common configuration and state mechanisms while provider schemas capture each platform's API differences; this meets the requirement to use a common configuration workflow across distinct vendors, while the other selected techniques address avoid hand-sequencing every resource operation and describe the desired infrastructure state instead of scripting every API step, which require their own distinct Terraform mechanisms.
F:Terraform interprets resource declarations, constructs a dependency graph, and asks providers to reconcile real objects with that desired state; this meets the requirement to describe the desired infrastructure state instead of scripting every API step, while the other selected techniques address use a common configuration workflow across distinct vendors and avoid hand-sequencing every resource operation, which require their own distinct Terraform mechanisms.
Incorrect Answers
A:IaC configuration provides repeatable definitions; variables and isolated state allow environments to differ without independently hand-building each object; it addresses recreate the same logical infrastructure design across test and production, but this delivery instead requires use a common configuration workflow across distinct vendors and avoid hand-sequencing every resource operation and describe the desired infrastructure state instead of scripting every API step. The required combination involves Declarative resource configuration and Consistent dependency management and Service-agnostic resource modeling, not the behavior of Repeatable environment definition.
B:Version control and run history provide traceable context for what configuration changed and what Terraform planned or applied; it addresses audit the results of infrastructure changes across a team, but this delivery instead requires use a common configuration workflow across distinct vendors and avoid hand-sequencing every resource operation and describe the desired infrastructure state instead of scripting every API step. The required combination involves Declarative resource configuration and Consistent dependency management and Service-agnostic resource modeling, not the behavior of Reusable execution records.
E:Terraform's core workflow works across providers even though their individual resources and authentication methods differ; it addresses apply the same validate-plan-apply lifecycle to more than one cloud, but this delivery instead requires use a common configuration workflow across distinct vendors and avoid hand-sequencing every resource operation and describe the desired infrastructure state instead of scripting every API step. The required combination involves Declarative resource configuration and Consistent dependency management and Service-agnostic resource modeling, not the behavior of Consistent automation pipeline.